* scsi/NCR5380: Suppress SDTR and WDTR message logging
@ 2017-10-26 5:51 Finn Thain
2017-10-31 12:17 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Finn Thain @ 2017-10-26 5:51 UTC (permalink / raw)
To: James E.J. Bottomley, Martin K. Petersen
Cc: Michael Schmitz, linux-scsi, linux-kernel
The 5380 drivers only support asynchronous transfers and the 5380
controllers only have narrow busses. Hence, the core driver will reject
any SDTR and WDTR messages from target devices. Don't log this, it's
expected behaviour. Also, fix the off-by-one array indices in the
arguments to scmd_printk().
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
index acc33440bca0..3cf16bca0dc6 100644
--- a/drivers/scsi/NCR5380.c
+++ b/drivers/scsi/NCR5380.c
@@ -1907,8 +1907,6 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
switch (extended_msg[2]) {
case EXTENDED_SDTR:
case EXTENDED_WDTR:
- case EXTENDED_MODIFY_DATA_POINTER:
- case EXTENDED_EXTENDED_IDENTIFY:
tmp = 0;
}
} else if (len) {
@@ -1931,18 +1929,14 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
* reject it.
*/
default:
- if (!tmp) {
- shost_printk(KERN_ERR, instance, "rejecting message ");
- spi_print_msg(extended_msg);
- printk("\n");
- } else if (tmp != EXTENDED_MESSAGE)
- scmd_printk(KERN_INFO, cmd,
- "rejecting unknown message %02x\n",
- tmp);
- else
+ if (tmp == EXTENDED_MESSAGE)
scmd_printk(KERN_INFO, cmd,
"rejecting unknown extended message code %02x, length %d\n",
- extended_msg[1], extended_msg[0]);
+ extended_msg[2], extended_msg[1]);
+ else if (tmp)
+ scmd_printk(KERN_INFO, cmd,
+ "rejecting unknown message code %02x\n",
+ tmp);
msgout = MESSAGE_REJECT;
NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_ATN);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: scsi/NCR5380: Suppress SDTR and WDTR message logging
2017-10-26 5:51 scsi/NCR5380: Suppress SDTR and WDTR message logging Finn Thain
@ 2017-10-31 12:17 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2017-10-31 12:17 UTC (permalink / raw)
To: Finn Thain
Cc: James E.J. Bottomley, Martin K. Petersen, Michael Schmitz,
linux-scsi, linux-kernel
Finn,
> The 5380 drivers only support asynchronous transfers and the 5380
> controllers only have narrow busses. Hence, the core driver will reject
> any SDTR and WDTR messages from target devices. Don't log this, it's
> expected behaviour. Also, fix the off-by-one array indices in the
> arguments to scmd_printk().
Applied to 4.15/scsi-queue. Thanks.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-31 12:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-26 5:51 scsi/NCR5380: Suppress SDTR and WDTR message logging Finn Thain
2017-10-31 12:17 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).