On Sun, Dec 11, 2016 at 08:59:36AM +0000, Piotr Isajew wrote:
> Dnia 11.12.2016 Jonathan Gray <[email protected]> napisa??/a:
> > [...]
> >> After plugging in, the modem appears as a mass storage device and
> >> it's necessary to issue a SCSI REZERO command to switch it to
> >> modem operation (i.e.: scsi -f /dev/rcd1c -c '1 0 0 0 0 0').
> >
> > The DEV_UMASS1 and DEV_UMASS2 flags in umsm already do variations of
> > rezero, does setting one of those remove the need to run the command?
>
> Thanks Jonathan :) DEV_UMASS1 seems to do the job. Updated patch:
Your patch had wrapped lines so it didn't apply. I've committed
it with the strings renamed to match the names Option uses.
>
> Index: share/man/man4/umsm.4
> ===================================================================
> RCS file: /cvs/src/share/man/man4/umsm.4,v
> retrieving revision 1.91
> diff -u -p -r1.91 umsm.4
> --- share/man/man4/umsm.4 5 Nov 2015 17:17:38 -0000 1.91
> +++ share/man/man4/umsm.4 11 Dec 2016 08:53:37 -0000
> @@ -98,6 +98,7 @@ driver:
> .It Li "Option GlobeTrotter HSDPA" Ta "USB"
> .It Li "Option GlobeTrotter HSDPA ICON225" Ta "USB"
> .It Li "Option GlobeTrotter HSUPA 380E" Ta "PCI Express Mini Card"
> +.It Li "Option GlobeTrotter HSDPA ICON505" Ta "USB"
> .It Li "Sierra Wireless MC8755" Ta "PCI Express Mini Card"
> .It Li "Sierra Wireless MC8775" Ta "PCI Express Mini Card"
> .It Li "Sierra Wireless MC8790" Ta "PCI Express Mini Card"
> Index: sys/dev/usb/umsm.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/umsm.c,v
> retrieving revision 1.106
> diff -u -p -r1.106 umsm.c
> --- sys/dev/usb/umsm.c 1 Jun 2016 13:20:01 -0000 1.106
> +++ sys/dev/usb/umsm.c 11 Dec 2016 08:53:38 -0000
> @@ -216,6 +216,8 @@ static const struct umsm_type umsm_devs[
> {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAX36 }, 0},
> {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_SCORPION }, 0},
> {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_VODAFONEMC3G }, 0},
> + {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTICON505 }, DEV_UMASS1},
>
> {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_EM5625 }, 0},
> {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC5720 }, 0},
> Index: sys/dev/usb/usbdevs
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/usbdevs,v
> retrieving revision 1.666
> diff -u -p -r1.666 usbdevs
> --- sys/dev/usb/usbdevs 1 Jun 2016 09:48:20 -0000 1.666
> +++ sys/dev/usb/usbdevs 11 Dec 2016 08:53:38 -0000
> @@ -4382,6 +4382,7 @@ product OPTION GSICON72 0x6911 GlobeSur
> product OPTION GTHSDPA225 0x6971 GlobeTrotter HSDPA Icon 225
> product OPTION GTHSUPA380E 0x7211 GlobeTrotter HSUPA 380E
> product OPTION GTICON322 0xd033 GlobeTrotter Icon322 storage
> +product OPTION GTICON505 0xd055 GlobeTrotter Icon505
>
> /* Vaisala Products */
> product VAISALA USBINSTCABLE 0x0200 USB instrument cable
> Index: sys/dev/usb/usbdevs.h
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/usbdevs.h,v
> retrieving revision 1.678
> diff -u -p -r1.678 usbdevs.h
> --- sys/dev/usb/usbdevs.h 1 Jun 2016 09:48:54 -0000 1.678
> +++ sys/dev/usb/usbdevs.h 11 Dec 2016 08:53:38 -0000
> @@ -4389,6 +4389,7 @@
> #define USB_PRODUCT_OPTION_GTHSDPA225 0x6971 /* GlobeTrotter
> HSDPA Icon 225 */
> #define USB_PRODUCT_OPTION_GTHSUPA380E 0x7211 /* GlobeTrotter
> HSUPA 380E */
> #define USB_PRODUCT_OPTION_GTICON322 0xd033 /* GlobeTrotter
> Icon322 storage */
> +#define USB_PRODUCT_OPTION_GTICON505 0xd055 /* GlobeTrotter
> Icon505 */
>
> /* Vaisala Products */
> #define USB_PRODUCT_VAISALA_USBINSTCABLE 0x0200 /* USB
> instrument cable */
> Index: sys/dev/usb/usbdevs_data.h
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/usbdevs_data.h,v
> retrieving revision 1.672
> diff -u -p -r1.672 usbdevs_data.h
> --- sys/dev/usb/usbdevs_data.h 1 Jun 2016 09:48:54 -0000 1.672
> +++ sys/dev/usb/usbdevs_data.h 11 Dec 2016 08:53:38 -0000
> @@ -11172,6 +11172,10 @@ const struct usb_known_product usb_known
> {
> USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTICON322,
> "GlobeTrotter Icon322 storage",
> + },
> + {
> + USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTICON505,
> + "GlobeTrotter Icon505",
> },
> {
> USB_VENDOR_VAISALA, USB_PRODUCT_VAISALA_USBINSTCABLE,
>
>
>
>
>