serial_cs broken on 2.6.12-rc4/2.6.12-rc4-mm2
PATCH 1/1 serial_cs broken on 2.6.12-rc4/2.6.12-rc4-mm2
Hello,
serial_cs's vendor/device identification got broken by Yum Rayan's
change '[PATCH] serial_cs: Reduce stack usage in serial_event()' - it changed buf type from u_short* to char*, breaking device manufacturer & card number retrieval. Due to this my modem stopped from being recognized as special case.
Code will work much better if we'll rely on first_tuple's parser
instead of doing parse ourselves. Code also looks simpler after change.
Thanks,
Petr Vandrovec
Apply directly on top of RC4. You'll have to redo my other serial_cs changes you have in the tree so you end up with state in second patch below after applying them... I have no quilt exprience...
drivers/serial/serial_cs.c +2 -2
@@ -661,10 +661,10 @@/* Is this a multiport card? */ tuple->DesiredTuple =CISTPL_MANFID ;if (first_tuple (handle, tuple, parse) ==CS_SUCCESS ) { - info->manfid =le16_to_cpu (buf[0 ]); + info->manfid = parse->manfid.manf;for (i =0 ; i <MULTI_COUNT ; i++)if ((info->manfid == multi_id[i].manfid) && - (le16_to_cpu (buf[1 ]) == multi_id[i].prodid)) + (parse->manfid.card == multi_id[i].prodid))break ;if (i <MULTI_COUNT ) info->multi = multi_id[i].multi;
Apply on top of MM2:
drivers/serial/serial_cs.c +2 -2
@@ -700,8 +700,8 @@/* Is this a multiport card? */ tuple->DesiredTuple =CISTPL_MANFID ;if (first_tuple (handle, tuple, parse) ==CS_SUCCESS ) { - info->manfid =le16_to_cpu (buf[0 ]); - info->prodid =le16_to_cpu (buf[1 ]); + info->manfid = parse->manfid.manf; + info->prodid = parse->manfid.card;for (i =0 ; i <MULTI_COUNT ; i++)if ((info->manfid == multi_id[i].manfid) && (info->prodid == multi_id[i].prodid))