Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jul 2003 19:00:09 -0700 (PDT)
From:      Nate Lawson <nate@root.org>
To:        current@freebsd.org
Cc:        scsi@freebsd.org
Subject:   PATCH: Disable 6 byte commands for USB, firewire, ATAPICAM
Message-ID:  <20030724183246.X42809@root.org>

next in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--0-1992410604-1059098409=:42898
Content-Type: TEXT/PLAIN; charset=US-ASCII

Attached is a patch that disables ever sending 6 byte commands to buses
that do not support them.  Numerous USB devices hang when receiving a 6
byte command.  For testing, this patch comments out the scsi_da quirks for
devices that I believe are addressed by this patch and no longer need the
quirk.

Please test devices such as USB keys, USB cameras, Firewire hard disks,
and ATAPICAM cd drives to be sure they still work with this patch.
Especially if you've needed a quirk before, it is important to see if this
patch does not break your device.  I hope to get this into the tree early
so there is plenty of testing before 5.2.

Thanks,
Nate
--0-1992410604-1059098409=:42898
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="6b.diff"
Content-Transfer-Encoding: BASE64
Content-ID: <20030724190009.J42898@root.org>
Content-Description: 
Content-Disposition: attachment; filename="6b.diff"

SW5kZXg6IC9zeXMvY2FtL2NhbV9jY2IuaA0KPT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PQ0KUkNTIGZpbGU6IC9ob21lL25jdnMvc3JjL3N5cy9jYW0vY2FtX2Nj
Yi5oLHYNCnJldHJpZXZpbmcgcmV2aXNpb24gMS4yNQ0KZGlmZiAtdSAtcjEu
MjUgY2FtX2NjYi5oDQotLS0gL3N5cy9jYW0vY2FtX2NjYi5oCTE0IEp1biAy
MDAzIDIyOjE3OjM4IC0wMDAwCTEuMjUNCisrKyAvc3lzL2NhbS9jYW1fY2Ni
LmgJMjUgSnVsIDIwMDMgMDE6MDE6NDUgLTAwMD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tZS9uY3ZzL3NyYy9zeXMvZGV2L2ZpcmV3aXJlL3NicC5jLHYNCnJl
dHJpZXZpbmcgcmV2aXNpb24gMS41Nw0KZGlmZiAtdSAtcjEuNTcgc2JwLmMN
Ci0tLSAvc3lzL2Rldi9maXJld2lyZS9zYnAuYwkxOCBKdWwgMjAwMyAxNDoz
MToxNiAtMDAwMAkxLjU3DQorKysgL3N5cy9kZXYvZmlyZXdpcmUvc2JwLmMJ
MjUgSnVsIDIwMDMgMDE6MTA6NTkgLTAwMDANCkBAIC0yMzY5LDcgKzIzNjks
NyBAQA0KIAkJY3BpLT52ZXJzaW9uX251bSA9IDE7IC8qIFhYWD8/PyAqLw0K
IAkJY3BpLT5oYmFfaW5xdWlyeSA9IFBJX1RBR19BQkxFOw0KIAkJY3BpLT50
YXJnZXRfc3BydCA9IDA7DQotCQljcGktPmhiYV9taXNjID0gUElNX05PQlVT
UkVTRVQ7DQorCQljcGktPmhiYV9taXNjID0gUElNX05PQlVTUkVTRVQgfCBQ
SU1fTk9fNl9CWVRFOw0KIAkJY3BpLT5oYmFfZW5nX2NudCA9IDA7DQogCQlj
cGktPm1heF90YXJnZXQgPSBTQlBfTlVNX1RBUkdFVFMgLSAxOw0KIAkJY3Bp
LT5tYXhfbHVuID0gU0JQX05VTV9MVU5TIC0gMTsNCg==

--0-1992410604-1059098409=:42898--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030724183246.X42809>