Mercurial > illumos > illumos-gate
changeset 10630:ccec6d9218ba
6883392 some scsi commands added to scsa2usb blacklist may not be filtered correctly
author | guoqing zhu - Sun Microsystems - Beijing China <Guoqing.Zhu@Sun.COM> |
---|---|
date | Thu, 24 Sep 2009 09:42:31 +0800 |
parents | 12b43beac546 |
children | abfe11cf0ce1 |
files | usr/src/uts/common/io/usb/scsa2usb/scsa2usb.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/io/usb/scsa2usb/scsa2usb.c Wed Sep 23 17:01:56 2009 -0700 +++ b/usr/src/uts/common/io/usb/scsa2usb/scsa2usb.c Thu Sep 24 09:42:31 2009 +0800 @@ -2973,11 +2973,13 @@ pkt->pkt_cdbp[0], cmd); } - /* just accept the command */ + /* just accept the command or return error */ if (transport == SCSA2USB_JUST_ACCEPT) { SCSA2USB_SET_PKT_DO_COMP_STATE(scsa2usbp); return (TRAN_ACCEPT); + } else if (transport == SCSA2USB_REJECT) { + return (TRAN_FATAL_ERROR); } /* check command set next */ @@ -3105,7 +3107,7 @@ unsigned int bufsize; int count; - if (cmd->cmd_cdb[1] & evpd) + if (cmd->cmd_pkt->pkt_cdbp[1] & evpd) return (SCSA2USB_REJECT); scsa2usb_fake_inquiry(scsa2usbp, inq);