Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Jan 2008 07:00:06 GMT
From:      Ben Kelly <bkelly@vadev.org>
To:        freebsd-usb@FreeBSD.org
Subject:   Re: usb/95173: [umass] [patch] cannot mount external usb harddisk VIA Technologies Inc. USB 2.0 IDE Bridge
Message-ID:  <200801260700.m0Q7063D046051@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR usb/95173; it has been noted by GNATS.

From: Ben Kelly <bkelly@vadev.org>
To: bug-followup@freebsd.org, diazepam@gmx.net
Cc:  
Subject: Re: usb/95173: [umass] [patch] cannot mount external usb harddisk VIA Technologies Inc. USB 2.0 IDE Bridge
Date: Sat, 26 Jan 2008 01:35:41 -0500

 --Apple-Mail-95--316157853
 Content-Type: text/plain;
 	charset=US-ASCII;
 	format=flowed;
 	delsp=yes
 Content-Transfer-Encoding: 7bit
 
 My last patch did not seem to get incorporated into the bug system  
 properly.  Here is a second attempt.
 
 
 --Apple-Mail-95--316157853
 Content-Disposition: attachment;
 	filename=via_usb_ata_patch.txt
 Content-Type: text/plain;
 	x-unix-mode=0700;
 	name="via_usb_ata_patch.txt"
 Content-Transfer-Encoding: 7bit
 
 Index: src/sys/dev/usb/usbdevs
 ===================================================================
 --- src/sys/dev/usb/usbdevs	(revision 6)
 +++ src/sys/dev/usb/usbdevs	(revision 9)
 @@ -2229,6 +2229,9 @@
  /* U.S. Robotics products */
  product USR USR5423		0x0121	USR5423 WLAN
  
 +/* VIA Technologies products */
 +product VIA USB2IDEBRIDGE	0x6204	USB 2.0 IDE Bridge
 +
  /* VidzMedia products */
  product VIDZMEDIA MONSTERTV	0x4fb1	MonsterTV P2H
  
 Index: src/sys/dev/usb/umass.c
 ===================================================================
 --- src/sys/dev/usb/umass.c	(revision 6)
 +++ src/sys/dev/usb/umass.c	(revision 9)
 @@ -323,6 +323,12 @@
  	 * sector number.
  	 */
  #	define READ_CAPACITY_OFFBY1	0x2000
 +	/* Device cannot handle a SCSI synchronize cache command.  Normally
 +	 * this quirk would be handled in the cam layer, but for IDE bridges
 +	 * we need to associate the quirk with the bridge and not the
 +	 * underlying disk device.  This is handled by faking a success result.
 +	 */
 +#	define NO_SYNCHRONIZE_CACHE	0x4000
  };
  
  static struct umass_devdescr_t umass_devdescrs[] = {
 @@ -804,6 +810,10 @@
  	  UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
  	  NO_QUIRKS
  	},
 +	{ USB_VENDOR_VIA, USB_PRODUCT_VIA_USB2IDEBRIDGE, RID_WILDCARD,
 +	  UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
 +	  NO_SYNCHRONIZE_CACHE
 +	},
  	{ USB_VENDOR_VIVITAR, USB_PRODUCT_VIVITAR_35XX, RID_WILDCARD,
  	  UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
  	  NO_INQUIRY
 @@ -2878,6 +2888,15 @@
  				xpt_done(ccb);
  				return;
  			}
 +			if ((sc->quirks & NO_SYNCHRONIZE_CACHE) &&
 +			    rcmd[0] == SYNCHRONIZE_CACHE) {
 +				struct ccb_scsiio *csio = &ccb->csio;
 +
 +				csio->scsi_status = SCSI_STATUS_OK;
 +				ccb->ccb_h.status = CAM_REQ_CMP;
 +				xpt_done(ccb);
 +				return;
 +			}
  			if ((sc->quirks & FORCE_SHORT_INQUIRY) &&
  			    rcmd[0] == INQUIRY) {
  				csio->dxfer_len = SHORT_INQUIRY_LENGTH;
 
 --Apple-Mail-95--316157853
 Content-Type: text/plain;
 	charset=US-ASCII;
 	format=flowed
 Content-Transfer-Encoding: 7bit
 
 
 
 --Apple-Mail-95--316157853--



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