* [PATCH] rtc-cmos: fix broken NVRAM bank 2 writing
@ 2011-11-08 17:07 Ondrej Zary
0 siblings, 0 replies; 4+ messages in thread
From: Ondrej Zary @ 2011-11-08 17:07 UTC (permalink / raw)
To: Alessandro Zummo; +Cc: rtc-linux, Kernel development list
Fix writing to NVRAM bank 2 in rtc-cmos driver. It never worked since its
introduction in 2.6.28 because of a typo.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
--- linux-3.1-orig/drivers/rtc/rtc-cmos.c 2011-10-24 09:10:05.000000000 +0200
+++ linux-3.1/drivers/rtc/rtc-cmos.c 2011-11-08 17:43:29.000000000 +0100
@@ -164,7 +164,7 @@ static inline unsigned char cmos_read_ba
static inline void cmos_write_bank2(unsigned char val, unsigned char addr)
{
outb(addr, RTC_PORT(2));
- outb(val, RTC_PORT(2));
+ outb(val, RTC_PORT(3));
}
#else
--
Ondrej Zary
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] rtc-cmos: fix broken NVRAM bank 2 writing
@ 2011-11-13 22:20 Ondrej Zary
2011-11-22 23:16 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: Ondrej Zary @ 2011-11-13 22:20 UTC (permalink / raw)
To: Alessandro Zummo; +Cc: rtc-linux, Kernel development list
Fix writing to NVRAM bank 2 in rtc-cmos driver. It never worked since its
introduction in 2.6.28 because of a typo.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
--- linux-3.1-orig/drivers/rtc/rtc-cmos.c 2011-10-24 09:10:05.000000000 +0200
+++ linux-3.1/drivers/rtc/rtc-cmos.c 2011-11-08 17:43:29.000000000 +0100
@@ -164,7 +164,7 @@ static inline unsigned char cmos_read_ba
static inline void cmos_write_bank2(unsigned char val, unsigned char addr)
{
outb(addr, RTC_PORT(2));
- outb(val, RTC_PORT(2));
+ outb(val, RTC_PORT(3));
}
#else
--
Ondrej Zary
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rtc-cmos: fix broken NVRAM bank 2 writing
2011-11-13 22:20 [PATCH] rtc-cmos: fix broken NVRAM bank 2 writing Ondrej Zary
@ 2011-11-22 23:16 ` Andrew Morton
2011-11-23 7:29 ` Ondrej Zary
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2011-11-22 23:16 UTC (permalink / raw)
To: Ondrej Zary; +Cc: Alessandro Zummo, rtc-linux, Kernel development list
On Sun, 13 Nov 2011 23:20:31 +0100
Ondrej Zary <linux@rainbow-software.org> wrote:
> Fix writing to NVRAM bank 2 in rtc-cmos driver. It never worked since its
> introduction in 2.6.28 because of a typo.
>
> Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
>
> --- linux-3.1-orig/drivers/rtc/rtc-cmos.c 2011-10-24 09:10:05.000000000 +0200
> +++ linux-3.1/drivers/rtc/rtc-cmos.c 2011-11-08 17:43:29.000000000 +0100
> @@ -164,7 +164,7 @@ static inline unsigned char cmos_read_ba
> static inline void cmos_write_bank2(unsigned char val, unsigned char addr)
> {
> outb(addr, RTC_PORT(2));
> - outb(val, RTC_PORT(2));
> + outb(val, RTC_PORT(3));
> }
>
> #else
Strange. Can you suggest why this bug has lived for so long without anyone
noticing it?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rtc-cmos: fix broken NVRAM bank 2 writing
2011-11-22 23:16 ` Andrew Morton
@ 2011-11-23 7:29 ` Ondrej Zary
0 siblings, 0 replies; 4+ messages in thread
From: Ondrej Zary @ 2011-11-23 7:29 UTC (permalink / raw)
To: Andrew Morton; +Cc: Alessandro Zummo, rtc-linux, Kernel development list
On Wednesday 23 November 2011, Andrew Morton wrote:
> On Sun, 13 Nov 2011 23:20:31 +0100
>
> Ondrej Zary <linux@rainbow-software.org> wrote:
> > Fix writing to NVRAM bank 2 in rtc-cmos driver. It never worked since its
> > introduction in 2.6.28 because of a typo.
> >
> > Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
> >
> > --- linux-3.1-orig/drivers/rtc/rtc-cmos.c 2011-10-24 09:10:05.000000000
> > +0200 +++ linux-3.1/drivers/rtc/rtc-cmos.c 2011-11-08 17:43:29.000000000
> > +0100 @@ -164,7 +164,7 @@ static inline unsigned char cmos_read_ba
> > static inline void cmos_write_bank2(unsigned char val, unsigned char
> > addr) {
> > outb(addr, RTC_PORT(2));
> > - outb(val, RTC_PORT(2));
> > + outb(val, RTC_PORT(3));
> > }
> >
> > #else
>
> Strange. Can you suggest why this bug has lived for so long without anyone
> noticing it?
Probably because nobody uses it. It's hidden in sysfs
(/sys/class/rtc/rtc0/device/nvram) and there's another (old) module "nvram"
that does (mostly) the same thing (except there's no bank 2 support).
--
Ondrej Zary
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-11-23 7:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-13 22:20 [PATCH] rtc-cmos: fix broken NVRAM bank 2 writing Ondrej Zary
2011-11-22 23:16 ` Andrew Morton
2011-11-23 7:29 ` Ondrej Zary
-- strict thread matches above, loose matches on Subject: below --
2011-11-08 17:07 Ondrej Zary
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox