Skip to content

Commit 0b7a223

Browse files
Finn Thainmartinkpetersen
authored andcommitted
scsi: NCR5380: Add disconnect_mask module parameter
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 <[email protected]> Link: https://lore.kernel.org/r/993b17545990f31f9fa5a98202b51102a68e7594.1573875417.git.fthain@telegraphics.com.au Reviewed-and-tested-by: Michael Schmitz <[email protected]> Signed-off-by: Finn Thain <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent d04fc41 commit 0b7a223

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 *);
@@ -967,7 +970,8 @@ static bool NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd)
967970
int err;
968971
bool ret = true;
969972
bool can_disconnect = instance->irq != NO_IRQ &&
970-
cmd->cmnd[0] != REQUEST_SENSE;
973+
cmd->cmnd[0] != REQUEST_SENSE &&
974+
(disconnect_mask & BIT(scmd_id(cmd)));
971975

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

0 commit comments

Comments
 (0)