net/8390: apne.c - read out and log PCMCIA cftable entries
Subsystems (2)
PATCH v2 1/1 net/8390: apne.c - read out and log PCMCIA cftable entries
Read the card's CISTPL_CFTABLE_ENTRY tuple, and log to the kernel log buffer. This tuple ought to hold information about the IO width of the card memory window that can be used in autoprobing to detect 16 bit datapath cards.
--- drivers/net/ethernet/8390/apne.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
drivers/net/ethernet/8390/apne.c +16 -0
@@ -127,6 +127,8 @@ struct net_device * __init apne_probe(int unit)#ifndef MANUAL_CONFIG char tuple[8 ]; +char cftuple[258 ]; +int len_cftuple =0 ;#endif int err;
@@ -168,6 +170,20 @@ struct net_device * __init apne_probe(int unit)free_netdev (dev); return ERR_PTR(-ENODEV); } + +if ((len_cftuple =pcmcia_copy_tuple (CISTPL_CFTABLE_ENTRY , cftuple,256 )) <3 ) { +pr_cont ("no cftable entry for card\n" ); +/* XXX: shouldn't we re-enable irq here? */ + }else { +int i; + +pr_info ("CFTABLE_ENTRY tuple:\n" ); +for (i=0 ; i<len_cftuple; i++) { +pr_cont ("%hhx " , cftuple[i]); +if (i >0 && !(i %10 ))pr_cont ("\n" ); + } +pr_cont ("\n" ); + }#endif pr_cont ("ethernet PCMCIA card inserted\n" );
Signature · 1 line
2.7.4
Hi Michael,
Quoted 26 lines · Michael Schmitz
Read the card's
CISTPL_CFTABLE_ENTRYtuple, and log to the kernel log buffer. This tuple ought to hold information about the IO width of the card memory window that can be used in autoprobing to detect 16 bit datapath cards.CC Debian/m68k <[email protected]>Signed-off-by Michael Schmitz <[email protected]>drivers/net/ethernet/8390/apne.c +5
-0@@ -127,6 +127,8 @@ struct net_device * __init apne_probe(int unit)#ifndef MANUAL_CONFIG char tuple[8 ]; +char cftuple[258 ]; +int len_cftuple =0 ;#endif int err;@@ -168,6 +170,20 @@ struct net_device * __init apne_probe(int unit)free_netdev (dev);return ERR_PTR (-ENODEV ); } + +if ((len_cftuple =pcmcia_copy_tuple (CISTPL_CFTABLE_ENTRY , cftuple,256 )) <3 ) { +pr_cont ("no cftable entry for card\n" );
drivers/net/ethernet/8390/apne.c struct net_device * __init apne_probe(int unit) · line 185
Quoted 10 lines
drivers/net/ethernet/8390/apne.c +10
-0+/* XXX: shouldn't we re-enable irq here? */ + }else { +int i; + +pr_info ("CFTABLE_ENTRY tuple:\n" ); +for (i=0 ; i<len_cftuple; i++) { +pr_cont ("%hhx " , cftuple[i]); +if (i >0 && !(i %10 ))pr_cont ("\n" ); + } +pr_cont ("\n" );
print_hex_dump()?
drivers/net/ethernet/8390/apne.c struct net_device * __init apne_probe(int unit) · line 189
Quoted 4 lines
drivers/net/ethernet/8390/apne.c +1
-0+ }#endif pr_cont ("ethernet PCMCIA card inserted\n" );
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Hi Geert,
Quoted 6 lines · Geert Uytterhoeven
Quoted 6 lines
drivers/net/ethernet/8390/apne.c +6
-0+ +if ((len_cftuple =pcmcia_copy_tuple (CISTPL_CFTABLE_ENTRY , cftuple,256 )) <3 ) { +pr_cont ("no cftable entry for card\n" ); +/* XXX: shouldn't we re-enable irq here? */ + }else { +int i;
Quoted 8 lines
drivers/net/ethernet/8390/apne.c struct net_device * __init apne_probe(int unit) · line 185
Quoted 7 lines
drivers/net/ethernet/8390/apne.c +7
-0+ +pr_info ("CFTABLE_ENTRY tuple:\n" ); +for (i=0 ; i<len_cftuple; i++) { +pr_cont ("%hhx " , cftuple[i]); +if (i >0 && !(i %10 ))pr_cont ("\n" ); + } +pr_cont ("\n" );
print_hex_dump()?
Too true - I'll use that in the next iteration.
Cheers,
Michael