Subject: kern/20541: quirk table entry for sys/dev/scsipi/scsiconf.c
To: None <gnats-bugs@gnats.netbsd.org>
From: None <gnats@allegory.demon.co.uk>
List: netbsd-bugs
Date: 03/02/2003 00:50:28
>Number:         20541
>Category:       kern
>Synopsis:       quirk table entry for sys/dev/scsipi/scsiconf.c
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 01 15:51:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Bob Kemp
>Release:        NetBSD 1.6P [Sun Mar  2 00:36:29 MET 2003]
>Organization:
Total lack of
>Environment:
System: NetBSD allegory.demon.co.uk 1.6P NetBSD 1.6P (ALLEGORY) #1: Sun Mar 2 00:21:51 MET 2003 root@allegory.demon.co.uk:/sys/arch/i386/compile/ALLEGORY i386
Architecture: i386
Machine: i386
>Description:
	No-Name USB Flash disk "UFD" gives nonsensical mode sense reply, eg

	Feb 25 00:56:33 allegory /netbsd: sd0 at scsibus0 target 1 lun 0: <UFD, , 7.77> disk removable
	Feb 25 00:56:33 allegory /netbsd: sd0: mode sense (4) returned nonsense; using fictitious geometry
	Feb 25 00:56:33 allegory /netbsd: sd0: 250 MB, 250 cyl, 64 head, 32 sec, 512 bytes/sect x 512000 sectors
	Feb 25 00:56:33 allegory /netbsd: sd0: mode sense (4) returned nonsense; using fictitious geometry
	Feb 25 00:56:33 allegory /netbsd: sd0: no disk label
	Feb 25 00:56:33 allegory /netbsd: sd0: mode sense (4) returned nonsense; using fictitious geometry
	Feb 25 00:56:33 allegory /netbsd: sd0: no disk label

>How-To-Repeat:
	For me: plug it into the USB port, for you I have no idea
>Fix:
    Add the following quirk table entry and there are no complaints in syslog.
    It will work fine either way but this way it's quiet too.

    *** tmp/scsiconf.c      Sun Mar  2 00:30:27 2003
    --- scsiconf.c  Sun Mar  2 00:33:40 2003
    ***************
    *** 425,433 ****
      }
      
      const struct scsi_quirk_inquiry_pattern scsi_quirk_patterns[] = {
    -       {{T_DIRECT, T_REMOV,
    -        "UFD", "",                   "7.77"}, PQUIRK_NOMODESENSE},
    - 
	    {{T_CDROM, T_REMOV,
	     "CHINON  ", "CD-ROM CDS-431  ", ""},     PQUIRK_NOLUNS},
	    {{T_CDROM, T_REMOV,
    --- 425,430 ----


>Release-Note:
>Audit-Trail:
>Unformatted: