-/* $OpenBSD: scsiconf.c,v 1.133 2008/07/21 23:40:03 dlg Exp $ */
+/* $OpenBSD: scsiconf.c,v 1.134 2008/07/22 00:40:37 dlg Exp $ */
/* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */
/*
* Braindead USB devices, especially some x-in-1 media readers, try to
* 'help' by pretending any LUN is actually LUN 0 until they see a
* different LUN used in a command. So do an INQUIRY on LUN 1 at this
- * point (since we are done with the data in inqbuf) to prevent such
- * helpfulness before it causes confusion.
+ * point to prevent such helpfulness before it causes confusion.
*/
if (lun == 0 && (sc_link->flags & SDEV_UMASS) &&
scsi->sc_link[target][1] == NULL && sc_link->luns > 1) {
struct scsi_inquiry_data tmpinq;
+
sc_link->lun = 1;
scsi_inquire(sc_link, &tmpinq, scsi_autoconf | SCSI_SILENT);
sc_link->lun = 0;