Files
ipxe/src/drivers/net
Michael Brown 19d3e966d9 [pcnet32] Eliminate redundant register read
The value of ( ( x & 0x0c00 ) | 0x0c00 ) is always 0x0c00 regardless
of the value of x, and so the read_csr() is redundant.  (There are no
read side effects for this register, according to the datasheet.)

This line of code originated in Linux kernel 2.3.19pre1 as

  a->write_csr(ioaddr, 80, a->read_csr(ioaddr, 80) | 0x0c00);

and was modified in kernel 2.3.41pre4 to read

  a->write_csr(ioaddr, 80, (a->read_csr(ioaddr, 80) & 0x0C00) | 0x0c00);

In the absence of commit messages, the intention of the code is
unclear.  However, the logic resulting in a fixed value of 0x0c00 has
remained unaltered for over 17 years, and can probably be assumed to
have the correct overall result.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2017-03-23 17:43:13 +02:00
..
2017-03-22 11:52:09 +02:00
2013-08-20 14:38:33 +01:00
2010-04-19 23:43:39 +01:00
2005-03-08 18:53:11 +00:00
2010-04-19 23:43:39 +01:00
2015-03-02 16:35:37 +00:00
2010-04-19 23:43:39 +01:00
2013-03-27 15:16:52 +00:00
2015-09-14 22:45:56 +01:00
2010-04-19 23:43:39 +01:00
2013-03-27 15:16:52 +00:00
2013-07-14 18:09:01 +02:00
2013-07-14 18:09:01 +02:00
2016-05-04 16:01:32 +01:00
2016-05-04 16:01:32 +01:00
2016-01-18 21:46:09 +00:00
2007-06-09 15:23:17 -04:00
2013-03-27 15:16:52 +00:00