*
******************************************************************************/
+#include <linux/module.h>
+#include <linux/moduleparam.h>
#include <linux/net.h>
#include <linux/string.h>
#include <linux/delay.h>
/* not static, needed by tpg.c */
struct se_device *g_lun0_dev;
+/* SCSI inquiry vendor string is 8 chars space padded + NULL. */
+char g_inquiry_vendor[9] = "LIO-ORG ";
+module_param_string(inquiry_vendor, g_inquiry_vendor,
+ sizeof(g_inquiry_vendor), S_IRUGO|S_IWUSR);
+MODULE_PARM_DESC(inquiry_vendor, "inquiry vendor string override");
+
sense_reason_t
transport_lookup_cmd_lun(struct se_cmd *se_cmd, u32 unpacked_lun)
{
* passthrough because this is being provided by the backend LLD.
*/
if (!(dev->transport->transport_flags & TRANSPORT_FLAG_PASSTHROUGH)) {
- strncpy(&dev->t10_wwn.vendor[0], "LIO-ORG", 8);
+ strncpy(&dev->t10_wwn.vendor[0], g_inquiry_vendor, 8);
strncpy(&dev->t10_wwn.model[0],
dev->transport->inquiry_prod, 16);
strncpy(&dev->t10_wwn.revision[0],
/* target_core_device.c */
extern struct mutex g_device_mutex;
extern struct list_head g_device_list;
+extern char g_inquiry_vendor[];
struct se_dev_entry *core_get_se_deve_from_rtpi(struct se_node_acl *, u16);
int core_free_device_list_for_node(struct se_node_acl *,
buf[7] = 0x2; /* CmdQue=1 */
- memcpy(&buf[8], "LIO-ORG ", 8);
+ memcpy(&buf[8], g_inquiry_vendor, 8);
memset(&buf[16], 0x20, 16);
memcpy(&buf[16], dev->t10_wwn.model,
min_t(size_t, strlen(dev->t10_wwn.model), 16));
buf[off] = 0x2; /* ASCII */
buf[off+1] = 0x1; /* T10 Vendor ID */
buf[off+2] = 0x0;
- memcpy(&buf[off+4], "LIO-ORG", 8);
+ memcpy(&buf[off+4], g_inquiry_vendor, 8);
/* Extra Byte for NULL Terminator */
id_len++;
/* Identifier Length */