From 884ffee01ddde5af260c7a5d1359c658aa1f0a11 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Sat, 26 Jul 2014 12:21:26 -0400 Subject: scsi: use short driver name for per-driver cmd slab caches hostt->name might contain space, so use the ->proc_name short name instead when creating per-driver command slabs. Signed-off-by: James Bottomley Reported-by: poma Tested-by: poma Reviewed-by: Vladimir Davydov Reviewed-by: Martin K. Petersen Cc: stable@vger.kernel.org Signed-off-by: Christoph Hellwig --- drivers/scsi/scsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 33318f5ebb4b..df3306019a7e 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -365,8 +365,8 @@ scsi_alloc_host_cmd_pool(struct Scsi_Host *shost) if (!pool) return NULL; - pool->cmd_name = kasprintf(GFP_KERNEL, "%s_cmd", hostt->name); - pool->sense_name = kasprintf(GFP_KERNEL, "%s_sense", hostt->name); + pool->cmd_name = kasprintf(GFP_KERNEL, "%s_cmd", hostt->proc_name); + pool->sense_name = kasprintf(GFP_KERNEL, "%s_sense", hostt->proc_name); if (!pool->cmd_name || !pool->sense_name) { scsi_free_host_cmd_pool(pool); return NULL; -- cgit v1.2.3-58-ga151 From 0213436a2cc5e4a5ca2fabfaa4d3877097f3b13f Mon Sep 17 00:00:00 2001 From: Janusz Dziemidowicz Date: Thu, 24 Jul 2014 15:48:46 +0200 Subject: scsi: do not issue SCSI RSOC command to Promise Vtrak E610f Some devices don't like REPORT SUPPORTED OPERATION CODES and will simply timeout causing sd_mod init to take a very very long time. Introduce BLIST_NO_RSOC scsi scan flag, that stops RSOC from being issued. Add it to Promise Vtrak E610f entry in scsi scan blacklist. Fixes bug #79901 reported at https://bugzilla.kernel.org/show_bug.cgi?id=79901 Fixes: 98dcc2946adb ("SCSI: sd: Update WRITE SAME heuristics") Signed-off-by: Janusz Dziemidowicz Reviewed-by: Martin K. Petersen Cc: stable@vger.kernel.org Signed-off-by: Christoph Hellwig --- drivers/scsi/scsi_devinfo.c | 1 + drivers/scsi/scsi_scan.c | 6 ++++++ include/scsi/scsi_devinfo.h | 2 ++ 3 files changed, 9 insertions(+) (limited to 'drivers/scsi') diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c index f969aca0b54e..49014a143c6a 100644 --- a/drivers/scsi/scsi_devinfo.c +++ b/drivers/scsi/scsi_devinfo.c @@ -222,6 +222,7 @@ static struct { {"PIONEER", "CD-ROM DRM-602X", NULL, BLIST_FORCELUN | BLIST_SINGLELUN}, {"PIONEER", "CD-ROM DRM-604X", NULL, BLIST_FORCELUN | BLIST_SINGLELUN}, {"PIONEER", "CD-ROM DRM-624X", NULL, BLIST_FORCELUN | BLIST_SINGLELUN}, + {"Promise", "VTrak E610f", NULL, BLIST_SPARSELUN | BLIST_NO_RSOC}, {"Promise", "", NULL, BLIST_SPARSELUN}, {"QUANTUM", "XP34301", "1071", BLIST_NOTQ}, {"REGAL", "CDC-4X", NULL, BLIST_MAX5LUN | BLIST_SINGLELUN}, diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 50536cd6b3f2..56675dbbf681 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -900,6 +900,12 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result, if (*bflags & BLIST_USE_10_BYTE_MS) sdev->use_10_for_ms = 1; + /* some devices don't like REPORT SUPPORTED OPERATION CODES + * and will simply timeout causing sd_mod init to take a very + * very long time */ + if (*bflags & BLIST_NO_RSOC) + sdev->no_report_opcodes = 1; + /* set the device running here so that slave configure * may do I/O */ ret = scsi_device_set_state(sdev, SDEV_RUNNING); diff --git a/include/scsi/scsi_devinfo.h b/include/scsi/scsi_devinfo.h index 1fdd6fc5492b..183eaab7c380 100644 --- a/include/scsi/scsi_devinfo.h +++ b/include/scsi/scsi_devinfo.h @@ -35,4 +35,6 @@ #define BLIST_SCSI3LUN 0x8000000 /* Scan more than 256 LUNs for sequential scan */ #define BLIST_TRY_VPD_PAGES 0x10000000 /* Attempt to read VPD pages */ +#define BLIST_NO_RSOC 0x20000000 /* don't try to issue RSOC */ + #endif -- cgit v1.2.3-58-ga151