Subject: Re: sd(4) on atapibus
To: Kouichirou Hiratsuka <hira@po6.nsk.ne.jp>
From: Jason Thorpe <thorpej@wasabisystems.com>
List: current-users
Date: 09/24/2003 09:48:56
On Wednesday, September 24, 2003, at 08:26  AM, Kouichirou Hiratsuka 
wrote:

> My USB floppy drive does work well with a following patch.

Will you please file a bug report using send-pr with your patch?

Thanks!

>
> best regards.
>
> -- 
>  Kouichirou Hiratsuka
>    hira@po6.nsk.ne.jp
>
> Index: sd.c
> ===================================================================
> RCS file: /cvs/cvsroot/src/sys/dev/scsipi/sd.c,v
> retrieving revision 1.210
> diff -u -r1.210 sd.c
> --- sd.c	18 Sep 2003 06:55:53 -0000	1.210
> +++ sd.c	24 Sep 2003 11:57:34 -0000
> @@ -87,6 +87,7 @@
>  #include <dev/scsipi/scsi_disk.h>
>  #include <dev/scsipi/scsiconf.h>
>  #include <dev/scsipi/sdvar.h>
> +#include <dev/scsipi/atapi_disk.h>
>
>  #define	SDUNIT(dev)			DISKUNIT(dev)
>  #define	SDPART(dev)			DISKPART(dev)
> @@ -1570,6 +1571,9 @@
>  	int page, flags;
>  	int *big;
>  {
> +
> +	if (scsipi_periph_bustype(sd->sc_periph) == SCSIPI_BUSTYPE_ATAPI)
> +		page = ATAPI_FLEX_GEOMETRY_PAGE;
>
>  	if ((sd->sc_periph->periph_quirks & PQUIRK_ONLYBIG) &&
>  	    !(sd->sc_periph->periph_quirks & PQUIRK_NOBIGMODESENSE)) {
>
>
         -- Jason R. Thorpe <thorpej@wasabisystems.com>