Re: usb/146104: Samsung YP-U4 mp3 player USB_ERR_TIMEOUT

2010-05-06 Thread Peter Toth
The following reply was made to PR usb/146104; it has been noted by GNATS.

From: Peter Toth peter.toth...@gmail.com
To: bug-follo...@freebsd.org, peter.toth...@gmail.com
Cc:  
Subject: Re: usb/146104: Samsung YP-U4 mp3 player USB_ERR_TIMEOUT
Date: Thu, 06 May 2010 19:44:36 +1200

 Just managed to try it on FreeBSD 8.0-STABLE/i386.
 
 Works fine, although it shows some errors, see bellow.
 
 
 ugen4.2: Linux 2.4.20-stmp36xx with stmp36xx_udc at usbus4
 umass0: Linux 2.4.20-stmp36xx with stmp36xx_udc USB Mass Storage, class  
 0/0, rev 2.00/2.29, addr 2 on usbus4
 umass0:  SCSI over Bulk-Only; quirks = 0x
 umass0:0:0:-1: Attached to scbus0
 da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
 da0: Samsung YP-U4 0229 Removable Direct Access SCSI-2 device
 da0: 40.000MB/s transfers
 da0: 3816MB (7816992 512 byte sectors: 255H 63S/T 486C)
 (da0:umass-sim0:0:0:0): SYNCHRONIZE CACHE(10). CDB: 35 0 0 0 0 0 0 0 0 0
 (da0:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:c,2 (Write error -  
 auto reallocation failed)
 (da0:umass-sim0:0:0:0): SYNCHRONIZE CACHE(10). CDB: 35 0 0 0 0 0 0 0 0 0
 (da0:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:c,2 (Write error -  
 auto reallocation failed)
 (da0:umass-sim0:0:0:0): SYNCHRONIZE CACHE(10). CDB: 35 0 0 0 0 0 0 0 0 0
 (da0:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:c,2 (Write error -  
 auto reallocation failed)
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: usb/146104: Samsung YP-U4 mp3 player USB_ERR_TIMEOUT

2010-05-06 Thread Hans Petter Selasky
On Thursday 06 May 2010 09:50:03 Peter Toth wrote:
 The following reply was made to PR usb/146104; it has been noted by GNATS.
 
 From: Peter Toth peter.toth...@gmail.com
 To: bug-follo...@freebsd.org, peter.toth...@gmail.com
 Cc:
 Subject: Re: usb/146104: Samsung YP-U4 mp3 player USB_ERR_TIMEOUT
 Date: Thu, 06 May 2010 19:44:36 +1200
 
  Just managed to try it on FreeBSD 8.0-STABLE/i386.
 
  Works fine, although it shows some errors, see bellow.
 
 
  ugen4.2: Linux 2.4.20-stmp36xx with stmp36xx_udc at usbus4
  umass0: Linux 2.4.20-stmp36xx with stmp36xx_udc USB Mass Storage, class
  0/0, rev 2.00/2.29, addr 2 on usbus4
  umass0:  SCSI over Bulk-Only; quirks = 0x
  umass0:0:0:-1: Attached to scbus0
  da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
  da0: Samsung YP-U4 0229 Removable Direct Access SCSI-2 device
  da0: 40.000MB/s transfers
  da0: 3816MB (7816992 512 byte sectors: 255H 63S/T 486C)
  (da0:umass-sim0:0:0:0): SYNCHRONIZE CACHE(10). CDB: 35 0 0 0 0 0 0 0 0 0
  (da0:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:c,2 (Write error -
  auto reallocation failed)
  (da0:umass-sim0:0:0:0): SYNCHRONIZE CACHE(10). CDB: 35 0 0 0 0 0 0 0 0 0
  (da0:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:c,2 (Write error -
  auto reallocation failed)
  (da0:umass-sim0:0:0:0): SYNCHRONIZE CACHE(10). CDB: 35 0 0 0 0 0 0 0 0 0
  (da0:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:c,2 (Write error -
  auto reallocation failed)

Hi,

This error can be fixed by adding a quirk to:

sys/dev/usb/quirk/usb_quirk.c

Please see already existing examples for the XXX_NO_SYNC_CACHE_XXX flag for 
mass storage devices.

Information about vid+pid can be obtained from usbconfig.

--HPS
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: usb/146104: Samsung YP-U4 mp3 player USB_ERR_TIMEOUT

2010-05-06 Thread Hans Petter Selasky
The following reply was made to PR usb/146104; it has been noted by GNATS.

From: Hans Petter Selasky hsela...@c2i.net
To: bug-follo...@freebsd.org
Cc:  
Subject: Re: usb/146104: Samsung YP-U4 mp3 player USB_ERR_TIMEOUT
Date: Thu, 6 May 2010 10:47:43 +0200

 On Thursday 06 May 2010 09:50:03 Peter Toth wrote:
  The following reply was made to PR usb/146104; it has been noted by GNATS.
  
  From: Peter Toth peter.toth...@gmail.com
  To: bug-follo...@freebsd.org, peter.toth...@gmail.com
  Cc:
  Subject: Re: usb/146104: Samsung YP-U4 mp3 player USB_ERR_TIMEOUT
  Date: Thu, 06 May 2010 19:44:36 +1200
  
   Just managed to try it on FreeBSD 8.0-STABLE/i386.
  
   Works fine, although it shows some errors, see bellow.
  
  
   ugen4.2: Linux 2.4.20-stmp36xx with stmp36xx_udc at usbus4
   umass0: Linux 2.4.20-stmp36xx with stmp36xx_udc USB Mass Storage, class
   0/0, rev 2.00/2.29, addr 2 on usbus4
   umass0:  SCSI over Bulk-Only; quirks = 0x
   umass0:0:0:-1: Attached to scbus0
   da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
   da0: Samsung YP-U4 0229 Removable Direct Access SCSI-2 device
   da0: 40.000MB/s transfers
   da0: 3816MB (7816992 512 byte sectors: 255H 63S/T 486C)
   (da0:umass-sim0:0:0:0): SYNCHRONIZE CACHE(10). CDB: 35 0 0 0 0 0 0 0 0 0
   (da0:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:c,2 (Write error -
   auto reallocation failed)
   (da0:umass-sim0:0:0:0): SYNCHRONIZE CACHE(10). CDB: 35 0 0 0 0 0 0 0 0 0
   (da0:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:c,2 (Write error -
   auto reallocation failed)
   (da0:umass-sim0:0:0:0): SYNCHRONIZE CACHE(10). CDB: 35 0 0 0 0 0 0 0 0 0
   (da0:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:c,2 (Write error -
   auto reallocation failed)
 
 Hi,
 
 This error can be fixed by adding a quirk to:
 
 sys/dev/usb/quirk/usb_quirk.c
 
 Please see already existing examples for the XXX_NO_SYNC_CACHE_XXX flag for 
 mass storage devices.
 
 Information about vid+pid can be obtained from usbconfig.
 
 --HPS
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: USB serial device naming

2010-05-06 Thread Alexandr Rybalko
On Wed, 5 May 2010 21:57:20 +0200
Hans Petter Selasky hsela...@c2i.net wrote:

 Hi,
 
 Thanks for all good ideas. Can you give some feedback on the following 
 solution:
 
 http://p4web.freebsd.org/@@19?ac=10

Looks interest, can You send to me patch to svn head. (So more difference in 
p4, without access to p4 difficult to test it)

Think uhub_child_location_string output must be added to attach event, so 
devd can make unique link for device.

 
 --HPS
 ___
 freebsd-usb@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-usb
 To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


-- 
Alexandr Rybalko r...@dlink.ua 
aka Alex RAY r...@ddteam.net
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Contact Us:(IRISH NATIONAL LOTTERY)

2010-05-06 Thread IRISH NATIONAL LOTTERY
Dear Reader   
   Greetings from Irish National Lottery here in london.We wish to inform you 
that £750,000.00 Pounds has been awarded to your E-mail in our IRISH NATIONAL 
LOTTERY ONLINE PROMO PROGRAMME To file your
claims contact our fiduciary agent for claims:
Mr. Edward Brown
Email: edwardbrow...@gmail.com 
Provide him with the information below:
Full Names:.
Tel:.
Sex:
Age:
Congratulations once more.



___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


apcupsd port regression from 7x. to 8.x

2010-05-06 Thread Mike Tancsa
While apcupsd works fine with one ups hooked up, apcupsd is not able 
to find multiple ones like it did on RELENG_7.  Looking at the way 
the code is compiled, it uses the generic libusd driver to talk to 
and find the UPSes on RELENG_8. Not sure if this is a bug with 
apcupsd or how it works with RELENG_8.


Running the daemon in debug mode, it loops through the following 
code, but always finds the same UPS and never 'moves on' to the next 
UPS like it did in RELENG_7. Has anyone got multiple UPSes working 
with apcupsd on RELENG_8 ?



   /* Initialize libusb */
   Dmsg0(200, Initializing libusb\n);
   usb_init();

   /* Enumerate usb busses and devices */
   i = usb_find_busses();
   Dmsg1(200, Found %d USB busses\n, i);
   i = usb_find_devices();
   Dmsg1(200, Found %d USB devices\n, i);

   /* Iterate over all devices, checking for idVendor=APC */
   bus = usb_get_busses();
   while (bus)
   {
  dev = bus-devices;
  while (dev)
  {
 Dmsg4(200, MDT bus loop %s:%s - %04x:%04x\n,
bus-dirname, dev-filename,
dev-descriptor.idVendor, dev-descriptor.idProduct);

 if (dev-descriptor.idVendor == VENDOR_APC) {
Dmsg2(200, Trying device %s:%s\n, bus-dirname, dev-filename);
if (init_device(ups, dev)) {
   /* Successfully found and initialized an UPS */
   astrncpy(ups-device, bus-dirname, sizeof(ups-device));
   astrncat(ups-device, :, sizeof(ups-device));
   astrncat(ups-device, dev-filename, sizeof(ups-device));
   return 1;
}
 }

 dev = dev-next;
  }

  bus = bus-next;
   }

   /* Failed to find an UPS */
   ups-device[0] = 0;
   return 0;
}

Where as the following are attached.  It only is ever able to talk to 
the ups on ugen1.2


0[upsmon1]#  usbconfig
ugen0.1: UHCI root HUB VIA at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
ugen1.1: UHCI root HUB VIA at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
ugen2.1: UHCI root HUB VIA at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
ugen3.1: UHCI root HUB VIA at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
ugen4.1: EHCI root HUB VIA at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON
ugen0.2: Back-UPS ES 725 FW:802.n2.D USB FW:n2 APC at usbus0, cfg=0 
md=HOST spd=LOW (1.5Mbps) pwr=ON
ugen4.2: USB2.0 Hub vendor 0x05e3 at usbus4, cfg=0 md=HOST spd=HIGH 
(480Mbps) pwr=SAVE
ugen4.3: Back-UPS ES 500 FW:801.e5.D USB FW:e5 APC at usbus4, cfg=0 
md=HOST spd=LOW (1.5Mbps) pwr=ON
ugen0.3: Back-UPS RS 1500 FW:8.g7 .D USB FW:g7 American Power 
Conversion at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON
ugen4.4: Back-UPS ES 650 FW:825.B1.D USB FW:B1 APC at usbus4, cfg=0 
md=HOST spd=LOW (1.5Mbps) pwr=ON
ugen4.5: Back-UPS RS 1500 FW:8.g8 .D USB FW:g8 American Power 
Conversion at usbus4, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON
ugen4.6: Back-UPS ES 500 FW:824.B1.D USB FW:B1 APC at usbus4, cfg=0 
md=HOST spd=LOW (1.5Mbps) pwr=ON
ugen1.2: Back-UPS ES 500 FW:824.B1.D USB FW:B1 APC at usbus1, cfg=0 
md=HOST spd=LOW (1.5Mbps) pwr=ON

0[upsmon1]#


0.000 apcupsd: apcupsd.c:219 Options parsed.
0.001 apcupsd: apcconfig.c:803 After config scriptdir: 
/usr/local/etc/apcupsd.a

0.001 apcupsd: apcconfig.c:804 After config pwrfailpath: /var/run/a
0.001 apcupsd: apcconfig.c:805 After config nologinpath: /var/run
0.001 apcupsd: apcupsd.c:242 Config file 
/usr/local/etc/apcupsd.a/apcupsd.conf processed.

0.001 apcupsd: :newups.c:102 write_lock at drivers.c:181
0.001 apcupsd: drivers.c:183 Looking for driver: usb
0.001 apcupsd: drivers.c:187 Driver dumb is configured.
0.001 apcupsd: drivers.c:187 Driver apcsmart is configured.
0.001 apcupsd: drivers.c:187 Driver net is configured.
0.001 apcupsd: drivers.c:187 Driver usb is configured.
0.001 apcupsd: drivers.c:190 Driver usb found and attached.
0.001 apcupsd: newups.c:108 write_unlock at drivers.c:207
0.001 apcupsd: drivers.c:209 Driver ptr=0x805c8e4
0.001 apcupsd: apcupsd.c:261 Attached to driver: usb
0.003 apcupsd: newups.c:102 write_lock at generic-usb.c:614
0.003 apcupsd: generic-usb.c:398 Initializing libusb
0.003 apcupsd: generic-usb.c:403 Found 0 USB busses
0.007 apcupsd: generic-usb.c:405 Found 0 USB devices
0.007 apcupsd: generic-usb.c:416 /dev/usb:/dev/ugen1.2 - 051d:0002
0.007 apcupsd: generic-usb.c:419 Trying device /dev/usb:/dev/ugen1.2
0.153 apcupsd: hidutils.c:62 Report descriptor:
0.153 apcupsd: apclog.c:158 Dumping 840 bytes @ 0x2823e000





Mike Tancsa,  tel +1 519 651 3400
Sentex Communications,m...@sentex.net
Providing Internet since 1994www.sentex.net
Cambridge, Ontario Canada www.sentex.net/mike

___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to 

Re: apcupsd port regression from 7x. to 8.x

2010-05-06 Thread Hans Petter Selasky
On Thursday 06 May 2010 21:49:46 Mike Tancsa wrote:
 While apcupsd works fine with one ups hooked up, apcupsd is not able
 to find multiple ones like it did on RELENG_7.  Looking at the way
 the code is compiled, it uses the generic libusd driver to talk to
 and find the UPSes on RELENG_8. Not sure if this is a bug with
 apcupsd or how it works with RELENG_8.
 
 Running the daemon in debug mode, it loops through the following
 code, but always finds the same UPS and never 'moves on' to the next
 UPS like it did in RELENG_7. Has anyone got multiple UPSes working
 with apcupsd on RELENG_8 ?
 
 
 /* Initialize libusb */
 Dmsg0(200, Initializing libusb\n);
 usb_init();
 
 /* Enumerate usb busses and devices */
 i = usb_find_busses();
 Dmsg1(200, Found %d USB busses\n, i);
 i = usb_find_devices();
 Dmsg1(200, Found %d USB devices\n, i);
 
 /* Iterate over all devices, checking for idVendor=APC */
 bus = usb_get_busses();
 while (bus)
 {
dev = bus-devices;
while (dev)
{
   Dmsg4(200, MDT bus loop %s:%s - %04x:%04x\n,
  bus-dirname, dev-filename,
  dev-descriptor.idVendor, dev-descriptor.idProduct);
 
   if (dev-descriptor.idVendor == VENDOR_APC) {
  Dmsg2(200, Trying device %s:%s\n, bus-dirname,
  dev-filename); if (init_device(ups, dev)) {
 /* Successfully found and initialized an UPS */
 astrncpy(ups-device, bus-dirname, sizeof(ups-device));
 astrncat(ups-device, :, sizeof(ups-device));
 astrncat(ups-device, dev-filename, sizeof(ups-device));
 return 1;
  }
   }
 
   dev = dev-next;
}
 
bus = bus-next;
 }
 
 /* Failed to find an UPS */
 ups-device[0] = 0;
 return 0;
 }
 
 Where as the following are attached.  It only is ever able to talk to
 the ups on ugen1.2
 
 0[upsmon1]#  usbconfig
 ugen0.1: UHCI root HUB VIA at usbus0, cfg=0 md=HOST spd=FULL (12Mbps)
  pwr=ON ugen1.1: UHCI root HUB VIA at usbus1, cfg=0 md=HOST spd=FULL
  (12Mbps) pwr=ON ugen2.1: UHCI root HUB VIA at usbus2, cfg=0 md=HOST
  spd=FULL (12Mbps) pwr=ON ugen3.1: UHCI root HUB VIA at usbus3, cfg=0
  md=HOST spd=FULL (12Mbps) pwr=ON ugen4.1: EHCI root HUB VIA at usbus4,
  cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON ugen0.2: Back-UPS ES 725
  FW:802.n2.D USB FW:n2 APC at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps)
  pwr=ON
 ugen4.2: USB2.0 Hub vendor 0x05e3 at usbus4, cfg=0 md=HOST spd=HIGH
 (480Mbps) pwr=SAVE
 ugen4.3: Back-UPS ES 500 FW:801.e5.D USB FW:e5 APC at usbus4, cfg=0
 md=HOST spd=LOW (1.5Mbps) pwr=ON
 ugen0.3: Back-UPS RS 1500 FW:8.g7 .D USB FW:g7 American Power
 Conversion at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON
 ugen4.4: Back-UPS ES 650 FW:825.B1.D USB FW:B1 APC at usbus4, cfg=0
 md=HOST spd=LOW (1.5Mbps) pwr=ON
 ugen4.5: Back-UPS RS 1500 FW:8.g8 .D USB FW:g8 American Power
 Conversion at usbus4, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON
 ugen4.6: Back-UPS ES 500 FW:824.B1.D USB FW:B1 APC at usbus4, cfg=0
 md=HOST spd=LOW (1.5Mbps) pwr=ON
 ugen1.2: Back-UPS ES 500 FW:824.B1.D USB FW:B1 APC at usbus1, cfg=0
 md=HOST spd=LOW (1.5Mbps) pwr=ON
 0[upsmon1]#
 
 
 0.000 apcupsd: apcupsd.c:219 Options parsed.
 0.001 apcupsd: apcconfig.c:803 After config scriptdir:
 /usr/local/etc/apcupsd.a
 0.001 apcupsd: apcconfig.c:804 After config pwrfailpath: /var/run/a
 0.001 apcupsd: apcconfig.c:805 After config nologinpath: /var/run
 0.001 apcupsd: apcupsd.c:242 Config file
 /usr/local/etc/apcupsd.a/apcupsd.conf processed.
 0.001 apcupsd: :newups.c:102 write_lock at drivers.c:181
 0.001 apcupsd: drivers.c:183 Looking for driver: usb
 0.001 apcupsd: drivers.c:187 Driver dumb is configured.
 0.001 apcupsd: drivers.c:187 Driver apcsmart is configured.
 0.001 apcupsd: drivers.c:187 Driver net is configured.
 0.001 apcupsd: drivers.c:187 Driver usb is configured.
 0.001 apcupsd: drivers.c:190 Driver usb found and attached.
 0.001 apcupsd: newups.c:108 write_unlock at drivers.c:207
 0.001 apcupsd: drivers.c:209 Driver ptr=0x805c8e4
 0.001 apcupsd: apcupsd.c:261 Attached to driver: usb
 0.003 apcupsd: newups.c:102 write_lock at generic-usb.c:614
 0.003 apcupsd: generic-usb.c:398 Initializing libusb
 0.003 apcupsd: generic-usb.c:403 Found 0 USB busses
 0.007 apcupsd: generic-usb.c:405 Found 0 USB devices
 0.007 apcupsd: generic-usb.c:416 /dev/usb:/dev/ugen1.2 - 051d:0002
 0.007 apcupsd: generic-usb.c:419 Trying device /dev/usb:/dev/ugen1.2
 0.153 apcupsd: hidutils.c:62 Report descriptor:
 0.153 apcupsd: apclog.c:158 Dumping 840 bytes @ 0x2823e000
 
 

Have you tried FreeBSD 8-STABLE ?

--HPS
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: apcupsd port regression from 7x. to 8.x

2010-05-06 Thread Mike Tancsa

At 03:56 PM 5/6/2010, Hans Petter Selasky wrote:



Have you tried FreeBSD 8-STABLE ?


Hi,
This is with RELENG_8 as of this morning.

---Mike



--HPS



Mike Tancsa,  tel +1 519 651 3400
Sentex Communications,m...@sentex.net
Providing Internet since 1994www.sentex.net
Cambridge, Ontario Canada www.sentex.net/mike

___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: apcupsd port regression from 7x. to 8.x

2010-05-06 Thread Hans Petter Selasky
On Thursday 06 May 2010 22:04:10 Mike Tancsa wrote:
 At 03:56 PM 5/6/2010, Hans Petter Selasky wrote:
 Have you tried FreeBSD 8-STABLE ?
 
 Hi,
  This is with RELENG_8 as of this morning.
 
  ---Mike

And you have also built and installed world?

--HPS
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: apcupsd port regression from 7x. to 8.x

2010-05-06 Thread Hans Petter Selasky
On Thursday 06 May 2010 21:49:46 Mike Tancsa wrote:
 While apcupsd works fine with one ups hooked up, apcupsd is not able
 to find multiple ones like it did on RELENG_7.  Looking at the way
 the code is compiled, it uses the generic libusd driver to talk to
 and find the UPSes on RELENG_8. Not sure if this is a bug with
 apcupsd or how it works with RELENG_8.
 
 Running the daemon in debug mode, it loops through the following
 code, but always finds the same UPS and never 'moves on' to the next
 UPS like it did in RELENG_7. Has anyone got multiple UPSes working
 with apcupsd on RELENG_8 ?
 
 
 /* Initialize libusb */
 Dmsg0(200, Initializing libusb\n);
 usb_init();
 
 /* Enumerate usb busses and devices */
 i = usb_find_busses();
 Dmsg1(200, Found %d USB busses\n, i);
 i = usb_find_devices();
 Dmsg1(200, Found %d USB devices\n, i);
 
 /* Iterate over all devices, checking for idVendor=APC */
 bus = usb_get_busses();
 while (bus)
 {
dev = bus-devices;
while (dev)
{
   Dmsg4(200, MDT bus loop %s:%s - %04x:%04x\n,
  bus-dirname, dev-filename,
  dev-descriptor.idVendor, dev-descriptor.idProduct);
 
   if (dev-descriptor.idVendor == VENDOR_APC) {
  Dmsg2(200, Trying device %s:%s\n, bus-dirname,
  dev-filename); if (init_device(ups, dev)) {
 /* Successfully found and initialized an UPS */
 astrncpy(ups-device, bus-dirname, sizeof(ups-device));
 astrncat(ups-device, :, sizeof(ups-device));
 astrncat(ups-device, dev-filename, sizeof(ups-device));
 return 1;
  }
   }
 
   dev = dev-next;
}
 
bus = bus-next;
 }
 
 /* Failed to find an UPS */
 ups-device[0] = 0;
 return 0;
 }
 
 Where as the following are attached.  It only is ever able to talk to
 the ups on ugen1.2
 
 0[upsmon1]#  usbconfig
 ugen0.1: UHCI root HUB VIA at usbus0, cfg=0 md=HOST spd=FULL (12Mbps)
  pwr=ON ugen1.1: UHCI root HUB VIA at usbus1, cfg=0 md=HOST spd=FULL
  (12Mbps) pwr=ON ugen2.1: UHCI root HUB VIA at usbus2, cfg=0 md=HOST
  spd=FULL (12Mbps) pwr=ON ugen3.1: UHCI root HUB VIA at usbus3, cfg=0
  md=HOST spd=FULL (12Mbps) pwr=ON ugen4.1: EHCI root HUB VIA at usbus4,
  cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON ugen0.2: Back-UPS ES 725
  FW:802.n2.D USB FW:n2 APC at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps)
  pwr=ON
 ugen4.2: USB2.0 Hub vendor 0x05e3 at usbus4, cfg=0 md=HOST spd=HIGH
 (480Mbps) pwr=SAVE
 ugen4.3: Back-UPS ES 500 FW:801.e5.D USB FW:e5 APC at usbus4, cfg=0
 md=HOST spd=LOW (1.5Mbps) pwr=ON
 ugen0.3: Back-UPS RS 1500 FW:8.g7 .D USB FW:g7 American Power
 Conversion at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON
 ugen4.4: Back-UPS ES 650 FW:825.B1.D USB FW:B1 APC at usbus4, cfg=0
 md=HOST spd=LOW (1.5Mbps) pwr=ON
 ugen4.5: Back-UPS RS 1500 FW:8.g8 .D USB FW:g8 American Power
 Conversion at usbus4, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON
 ugen4.6: Back-UPS ES 500 FW:824.B1.D USB FW:B1 APC at usbus4, cfg=0
 md=HOST spd=LOW (1.5Mbps) pwr=ON
 ugen1.2: Back-UPS ES 500 FW:824.B1.D USB FW:B1 APC at usbus1, cfg=0
 md=HOST spd=LOW (1.5Mbps) pwr=ON
 0[upsmon1]#
 
 
 0.000 apcupsd: apcupsd.c:219 Options parsed.
 0.001 apcupsd: apcconfig.c:803 After config scriptdir:
 /usr/local/etc/apcupsd.a
 0.001 apcupsd: apcconfig.c:804 After config pwrfailpath: /var/run/a
 0.001 apcupsd: apcconfig.c:805 After config nologinpath: /var/run
 0.001 apcupsd: apcupsd.c:242 Config file
 /usr/local/etc/apcupsd.a/apcupsd.conf processed.
 0.001 apcupsd: :newups.c:102 write_lock at drivers.c:181
 0.001 apcupsd: drivers.c:183 Looking for driver: usb
 0.001 apcupsd: drivers.c:187 Driver dumb is configured.
 0.001 apcupsd: drivers.c:187 Driver apcsmart is configured.
 0.001 apcupsd: drivers.c:187 Driver net is configured.
 0.001 apcupsd: drivers.c:187 Driver usb is configured.
 0.001 apcupsd: drivers.c:190 Driver usb found and attached.
 0.001 apcupsd: newups.c:108 write_unlock at drivers.c:207
 0.001 apcupsd: drivers.c:209 Driver ptr=0x805c8e4
 0.001 apcupsd: apcupsd.c:261 Attached to driver: usb
 0.003 apcupsd: newups.c:102 write_lock at generic-usb.c:614
 0.003 apcupsd: generic-usb.c:398 Initializing libusb

The FreeBSD LibUSB v0.1 reports the wrong number of busses and devices. I can 
fix this.

 0.003 apcupsd: generic-usb.c:403 Found 0 USB busses
 0.007 apcupsd: generic-usb.c:405 Found 0 USB devices

The problem is that the UPS code is designed to attach to the first matching 
device only. LibUSB does not hide devices with drivers already attached, which 
I think your utility assumes. You should use:

pidfile, see man pidfile

To create a temporary file with some string which consists of all numbers in 
udev-filename, separated by .. Or USB LibUSB v.1.0!

I've made a small patch, but it won't fix your issue :-(

http://p4web.freebsd.org/@@177865?ac=10

--HPS
___

Re: apcupsd port regression from 7x. to 8.x

2010-05-06 Thread Mike Tancsa

At 04:40 PM 5/6/2010, Hans Petter Selasky wrote:

 0.003 apcupsd: generic-usb.c:398 Initializing libusb

The FreeBSD LibUSB v0.1 reports the wrong number of busses and devices. I can
fix this.


Great!


 0.003 apcupsd: generic-usb.c:403 Found 0 USB busses
 0.007 apcupsd: generic-usb.c:405 Found 0 USB devices

The problem is that the UPS code is designed to attach to the first matching
device only. LibUSB does not hide devices with drivers already 
attached, which

I think your utility assumes. You should use:

pidfile, see man pidfile

To create a temporary file with some string which consists of all numbers in
udev-filename, separated by .. Or USB LibUSB v.1.0!


I am guessing the program would need to be re-written to use v1.0 
?  Thanks for the feedback and help as always!


I also found another work around by the author of the daemon which works great!

http://kroptech.com/mailimport/showmsg.php?msg_id=3665255961db_name=apcupsd-users



I've made a small patch, but it won't fix your issue :-(

http://p4web.freebsd.org/@@177865?ac=10

--HPS



Mike Tancsa,  tel +1 519 651 3400
Sentex Communications,m...@sentex.net
Providing Internet since 1994www.sentex.net
Cambridge, Ontario Canada www.sentex.net/mike

___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Revision 205728: broken bluetooth mouse support

2010-05-06 Thread Alex Deiter
Hi,

Bluetooth mouse support is broken after Revision 205728:

http://svn.freebsd.org/viewvc/base?view=revisionrevision=205728

When I move the mouse  - cursor stays in same place but moves the
current position of the console.

Proposed patch as an attachment. Could you please revew this ?

Thanks a lot!

--
Alex Deiter
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


usb/146367: [PATCH] Revision 205728: broken bluetooth mouse support

2010-05-06 Thread Alex Deiter

Number: 146367
Category:   usb
Synopsis:   [PATCH] Revision 205728: broken bluetooth mouse support
Confidential:   no
Severity:   serious
Priority:   medium
Responsible:freebsd-usb
State:  open
Quarter:
Keywords:   
Date-Required:
Class:  sw-bug
Submitter-Id:   current-users
Arrival-Date:   Fri May 07 03:50:01 UTC 2010
Closed-Date:
Last-Modified:
Originator: Alex Deiter
Release:9.0
Organization:
N/A
Environment:
today 9.0-current (Revision 207680)
Description:
Hi,

Bluetooth mouse support is broken after Revision 205728:

http://svn.freebsd.org/viewvc/base?view=revisionrevision=205728

When I move the mouse  - cursor stays in same place but moves the
current position of the console.

Proposed patch as an attachment. Could you please revew this ?

Thanks a lot!

How-To-Repeat:

Fix:
please review patch

Patch attached with submission follows:

--- lib/libusbhid/data.c.orig   2010-05-07 01:26:45.192120194 +0400
+++ lib/libusbhid/data.c2010-05-07 01:55:56.114702254 +0400
@@ -40,15 +40,10 @@
const uint8_t *buf;
uint32_t hpos;
uint32_t hsize;
-   uint32_t data;
+   int32_t data;
int i, end, offs;
 
buf = p;
-
-   /* Skip report ID byte. */
-   if (h-report_ID  0)
-   buf++;
-
hpos = h-pos;  /* bit position of data */
hsize = h-report_size; /* bit length of data */
 


Release-Note:
Audit-Trail:
Unformatted:
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org