2 Broadcom-SSB SPROM data modification tool
3 =========================================
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.
15 1) C99 compatible compiler.
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!!!
30 Obtaining a disk copy of the sprom contents
31 -------------------------------------------
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
36 /sys/devices/pci0000:00/0000:00:0d.0/0000:04:00.0/ssb_sprom
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
42 SSB_SPROM=$(find /sys -name ssb_sprom)
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
56 SSB_SPROM=$(find /sys -name ssb_sprom | grep 04:00.0)
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.
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
67 sudo cat $SSB_SPROM > ssb_sprom_copy
69 Modifying the contents of the working copy
70 ------------------------------------------
72 You may now see the contents of your sprom with the command
74 ssb-sprom -i ssb_sprom_copy -P
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
83 ssb-sprom -i ssb_sprom_copy -o new_ssb_sprom_copy --subv 0x103C
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
89 ssb-sprom -i new_ssb_sprom_copy -o new_ssb_sprom_copy --subp 0x137C
91 would be used. Note that the input and output files may be the same.
92 Once you think you have updated correctly, use
94 ssb-sprom -i new_ssb_sprom_copy -P
96 to check the contents.
98 Rewriting the sprom contents
99 ----------------------------
101 Once the sprom contents are the way you want them, and presumably
102 correct, you are ready to rewrite the file. First, use
106 to ensure that this symbol still contains the SPROM path. If not,
107 then it will have to be reloaded as discussed above.
109 You are then ready to rewrite the sprom with
111 sudo cp new_ssb_sprom_copy $SSB_SPROM
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.