fwcutter: Update .gitignore
[b43-tools.git] / ssb_sprom / README
1
2         Broadcom-SSB SPROM data modification tool
3         =========================================
4
5 About this software
6 -------------------
7
8 A tool for the convenient modification of the
9 Broadcom Sonics Silicon Backplane SPROM.
10 This tool automatically adjusts the CRC after the modification.
11
12 Requirements
13 ------------
14
15 1)      C99 compatible compiler.
16
17
18 Usage
19 -----
20
21 The contents of the sprom are exposed to the user in sysfs. This
22 tool can, in principle, read and write the sprom in place; however,
23 making a mistake during sprom writing could render your device
24 unusable. For this reason, we recommend copying the sprom contents
25 to disk as the first step. This copy can then be modified until it
26 contains the desired new information. Only then and with caution
27 should the sprom be rewritten. DO NOT MAKE ANY CHANGES UNLESS YOU
28 KNOW WHAT YOU ARE DOING!!!! You have been warned!!!
29
30 Obtaining a disk copy of the sprom contents
31 -------------------------------------------
32
33 This file name for the sprom contents depends on the bus layout of
34 the specific computer being used and will be something like
35
36 /sys/devices/pci0000:00/0000:00:0d.0/0000:04:00.0/ssb_sprom
37
38 It is not recommended that you try to type the name. Instead, you
39 should use the following commands to get and check the path for the
40 sprom file:
41
42 SSB_SPROM=$(find /sys -name ssb_sprom)
43 echo $SSB_SPROM
44
45 If the echo command only results in a single instance of "/sys/...",
46 you may proceed. For systems with more than one SSB-based interface,
47 there will be such a string for each, and the command that sets the
48 SSB_SPROM symbol will have to be changed. In the name above, the
49 sequence states that this device is attached to the 0'th PCI bus via
50 bridge 0d.0 and is device 04:00.0 on that bridge. To find which of
51 your SSB devices to select, use the 'lspci -v' command. On my system,
52 the first line of such output for my interface is "04:00.0 Network
53 controller: Broadcom Corporation BCM94311MCG wlan mini-PCI (rev 02)".
54 To select only this device, one would use
55
56 SSB_SPROM=$(find /sys -name ssb_sprom | grep 04:00.0)
57 echo $SSB_SPROM
58
59 Of course, the "04:00.0" needs to match your system, and check the
60 output value to determine that there is now a single instance of
61 "/sys..." and that the path matches the device whose SPROM is to be
62 changed. If not, adjust the string after 'grep' accordingly.
63
64 Once the SSB_SPROM variable matches the path to ssb_sprom for your
65 device, get a working copy of the sprom contents with
66
67 sudo cat $SSB_SPROM > ssb_sprom_copy
68
69 Modifying the contents of the working copy
70 ------------------------------------------
71
72 You may now see the contents of your sprom with the command
73
74 ssb-sprom -i ssb_sprom_copy -P
75
76 As an example, let us suppose that you have purchased a Dell mini-pci
77 card to use in an HP laptop. The HP BIOS refuses to use the card when
78 the pcivendor is Dell (code 0x1028), not HP (code 0x103C). From the
79 information provided by an "ssb-prom --help" command, we learn that
80 the switch needed to change this vendor code is "--subv". To change
81 that code, we use the command
82
83 ssb-sprom -i ssb_sprom_copy -o new_ssb_sprom_copy --subv 0x103C
84
85 to write the HP vendor ID to our working copy. I use different
86 input and output files so as not to destroy the original. If further
87 changes are needed, for example the PCI product ID, the command
88
89 ssb-sprom -i new_ssb_sprom_copy -o new_ssb_sprom_copy --subp 0x137C
90
91 would be used. Note that the input and output files may be the same.
92 Once you think you have updated correctly, use
93
94 ssb-sprom -i new_ssb_sprom_copy -P
95
96 to check the contents.
97
98 Rewriting the sprom contents
99 ----------------------------
100
101 Once the sprom contents are the way you want them, and presumably
102 correct, you are ready to rewrite the file. First, use
103
104 echo $SSB_SPROM
105
106 to ensure that this symbol still contains the SPROM path. If not,
107 then it will have to be reloaded as discussed above.
108
109 You are then ready to rewrite the sprom with
110
111 sudo cp new_ssb_sprom_copy $SSB_SPROM
112
113 Once again, you are urged to be absolutely certain of the contents
114 of the working copy BEFORE taking this step. If your interface
115 becomes unusable as a result of writing incorrect data into the
116 sprom, the responsibility is YOURS. Once again, you have been warned.