Skip to content

Commit 0ebfc03

Browse files
Finn Thaingregkh
authored andcommitted
scsi: NCR5380: Add disconnect_mask module parameter
[ Upstream commit 0b7a223 ] Add a module parameter to inhibit disconnect/reselect for individual targets. This gains compatibility with Aztec PowerMonster SCSI/SATA adapters with buggy firmware. (No fix is available from the vendor.) Apparently these adapters pass-through the product/vendor of the attached SATA device. Since they can't be identified from the response to an INQUIRY command, a device blacklist flag won't work. Cc: Michael Schmitz <schmitzmic@gmail.com> Link: https://lore.kernel.org/r/993b17545990f31f9fa5a98202b51102a68e7594.1573875417.git.fthain@telegraphics.com.au Reviewed-and-tested-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 1b4128a commit 0ebfc03

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/scsi/NCR5380.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@
129129
#define NCR5380_release_dma_irq(x)
130130
#endif
131131

132+
static unsigned int disconnect_mask = ~0;
133+
module_param(disconnect_mask, int, 0444);
134+
132135
static int do_abort(struct Scsi_Host *);
133136
static void do_reset(struct Scsi_Host *);
134137
static void bus_reset_cleanup(struct Scsi_Host *);
@@ -946,7 +949,8 @@ static bool NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd)
946949
int err;
947950
bool ret = true;
948951
bool can_disconnect = instance->irq != NO_IRQ &&
949-
cmd->cmnd[0] != REQUEST_SENSE;
952+
cmd->cmnd[0] != REQUEST_SENSE &&
953+
(disconnect_mask & BIT(scmd_id(cmd)));
950954

951955
NCR5380_dprint(NDEBUG_ARBITRATION, instance);
952956
dsprintk(NDEBUG_ARBITRATION, instance, "starting arbitration, id = %d\n",

0 commit comments

Comments
 (0)