Panasonic MD10000 y Nikon D3000

2011-01-20 Thread DigitalesNet
USD1390   PANASONIC 
NV-MD1  Sensor:  3 CCD Sistema:
PAL / Formato: Mini DV  Monitor: TFT 2.5 pulgadas / Zoom: Optico: 15x   
  Digital: 750x / Accesorios incluidos: Cables AV   
  y USB / Bateriacute;a / Adaptador-cargador AC
 / Software   USD   
723   NIKON  D3000 KIT 18-55 mm
Caacute;mara  digital reacute;flex,
objetivos intercambiables  / Sensor CCD de
10,20 MP efectivos / Tamantilde;o  sensor
23,60 x 15,80mm / Montura Nikon - Kit de 
lentes 18-55 mm / Factor de multiplicacioacute;n   
  1,50x / Pantalla TFT de 3,00 pulgadas



Re: /bsd: splassert: assertwaitok: want -1 have 1

2011-01-20 Thread Gregory Edigarov
On Wed, 19 Jan 2011 20:14:01 +1100
Joel Sing j...@sing.id.au wrote:

 On Wednesday 19 January 2011, Gregory Edigarov wrote:
  Hello,
 
  I have my home system connected via pppoe(4) to a provider and
  connection disapears very frequently some once an hour.
  Just before connection is gone I always see the following in my
  logs:
 
  /bsd: splassert: assertwaitok: want -1 have 1
 
 Please set kern.splassert = 2 and provide a stack trace.
 
  My first thought was that something happens on provider's side but I
  eliminate this reason connecting one of my other boxes(with linux)
  directly to my provider. The linux box is working correctly.
  I've also tryed to change the nic. It was rl(4) now it is vr(4).
  Result is the same.
 
  System is:
  # uname -a
  OpenBSD edigarov.sa.net.ua 4.9 GENERIC#11 amd64
  rebuilt on Sun 16 Jan.
 
--- interrupt ---
end trace frame: 0x0, count: 245
0x8:
End of stack trace.
pppoe0: received unexpected PADO
pppoe0: chap failure
pppoe: GENERIC ERROR: RP-PPPoE: Child pppd process terminated
pppoe0: received unexpected PADO
pppoe0: chap failure
pppoe: GENERIC ERROR: RP-PPPoE: Child pppd process terminated
pppoe0: received unexpected PADO
pppoe0: chap failure
pppoe: GENERIC ERROR: RP-PPPoE: Child pppd process terminated
pppoe0: received unexpected PADO
splassert: assertwaitok: want -1 have 1
Starting stack trace...
assertwaitok() at assertwaitok+0x1c
pool_get() at pool_get+0x95
ifa_item_insert() at ifa_item_insert+0x35
ifa_add() at ifa_add+0x43
in_ifinit() at in_ifinit+0x16f
sppp_set_ip_addrs() at sppp_set_ip_addrs+0x107
sppp_ipcp_tlu() at sppp_ipcp_tlu+0x4e
sppp_input() at sppp_input+0x594
pppoeintr() at pppoeintr+0x41d
netintr() at netintr+0x97
softintr_dispatch() at softintr_dispatch+0x5d
Xsoftnet() at Xsoftnet+0x28
--- interrupt ---
end trace frame: 0x0, count: 245
0x8:
End of stack trace.


-- 
With best regards,
Gregory Edigarov



Re: /bsd: splassert: assertwaitok: want -1 have 1

2011-01-20 Thread Joel Sing
On Thursday 20 January 2011, Gregory Edigarov wrote:
 On Wed, 19 Jan 2011 20:14:01 +1100

 Joel Sing j...@sing.id.au wrote:
  On Wednesday 19 January 2011, Gregory Edigarov wrote:
   Hello,
  
   I have my home system connected via pppoe(4) to a provider and
   connection disapears very frequently some once an hour.
   Just before connection is gone I always see the following in my
   logs:
  
   /bsd: splassert: assertwaitok: want -1 have 1
 
  Please set kern.splassert = 2 and provide a stack trace.
 
   My first thought was that something happens on provider's side but I
   eliminate this reason connecting one of my other boxes(with linux)
   directly to my provider. The linux box is working correctly.
   I've also tryed to change the nic. It was rl(4) now it is vr(4).
   Result is the same.
  
   System is:
   # uname -a
   OpenBSD edigarov.sa.net.ua 4.9 GENERIC#11 amd64
   rebuilt on Sun 16 Jan.

 --- interrupt ---
 end trace frame: 0x0, count: 245
 0x8:
 End of stack trace.
 pppoe0: received unexpected PADO
 pppoe0: chap failure
 pppoe: GENERIC ERROR: RP-PPPoE: Child pppd process terminated

This message is not being generated by from pppoe(4), rather it is originating 
from the remote end. Looks like the remote end is running Roaring Penguin 
(RP) PPPoE and that for some reason the pppd process is terminating. The 
preceeding unexpected PADO (PPPoE Active Discovery Offer) and chap failure 
suggest that the other end is making an unsolicity offer that then fails 
authentication and therefore results in session disconnection.

 pppoe0: received unexpected PADO
 pppoe0: chap failure
 pppoe: GENERIC ERROR: RP-PPPoE: Child pppd process terminated
 pppoe0: received unexpected PADO
 pppoe0: chap failure
 pppoe: GENERIC ERROR: RP-PPPoE: Child pppd process terminated
 pppoe0: received unexpected PADO
 splassert: assertwaitok: want -1 have 1

This part is a bug in OpenBSD - an IPCP message is trigging the addition of an 
interface address from interrupt context, which is no longer permitted. The 
dropout and reconnection is however triggering it.

 Starting stack trace...
 assertwaitok() at assertwaitok+0x1c
 pool_get() at pool_get+0x95
 ifa_item_insert() at ifa_item_insert+0x35
 ifa_add() at ifa_add+0x43
 in_ifinit() at in_ifinit+0x16f
 sppp_set_ip_addrs() at sppp_set_ip_addrs+0x107
 sppp_ipcp_tlu() at sppp_ipcp_tlu+0x4e
 sppp_input() at sppp_input+0x594
 pppoeintr() at pppoeintr+0x41d
 netintr() at netintr+0x97
 softintr_dispatch() at softintr_dispatch+0x5d
 Xsoftnet() at Xsoftnet+0x28
 --- interrupt ---
 end trace frame: 0x0, count: 245
 0x8:
 End of stack trace.

-- 

   Stop assuming that systems are secure unless demonstrated insecure;
start assuming that systems are insecure unless designed securely.
  - Bruce Schneier



Re: /bsd: splassert: assertwaitok: want -1 have 1

2011-01-20 Thread Mike Belopuhov
On Thu, Jan 20, 2011 at 10:31 +0200, Gregory Edigarov wrote:
 --- interrupt ---
 end trace frame: 0x0, count: 245
 0x8:
 End of stack trace.
 pppoe0: received unexpected PADO
 pppoe0: chap failure
 pppoe: GENERIC ERROR: RP-PPPoE: Child pppd process terminated
 pppoe0: received unexpected PADO
 pppoe0: chap failure
 pppoe: GENERIC ERROR: RP-PPPoE: Child pppd process terminated
 pppoe0: received unexpected PADO
 pppoe0: chap failure
 pppoe: GENERIC ERROR: RP-PPPoE: Child pppd process terminated
 pppoe0: received unexpected PADO
 splassert: assertwaitok: want -1 have 1
 Starting stack trace...
 assertwaitok() at assertwaitok+0x1c
 pool_get() at pool_get+0x95
 ifa_item_insert() at ifa_item_insert+0x35
 ifa_add() at ifa_add+0x43
 in_ifinit() at in_ifinit+0x16f
 sppp_set_ip_addrs() at sppp_set_ip_addrs+0x107
 sppp_ipcp_tlu() at sppp_ipcp_tlu+0x4e
 sppp_input() at sppp_input+0x594
 pppoeintr() at pppoeintr+0x41d
 netintr() at netintr+0x97
 softintr_dispatch() at softintr_dispatch+0x5d
 Xsoftnet() at Xsoftnet+0x28
 --- interrupt ---
 end trace frame: 0x0, count: 245
 0x8:
 End of stack trace.
 

seems like this is the only plausible way to fix it:

Index: net/if.c
===
RCS file: /home/cvs/src/sys/net/if.c,v
retrieving revision 1.231
diff -u -p -r1.231 if.c
--- net/if.c29 Nov 2010 19:38:59 -  1.231
+++ net/if.c20 Jan 2011 11:11:53 -
@@ -2213,7 +2213,7 @@ ifa_item_insert(struct sockaddr *sa, str
 {
struct ifaddr_item  *ifai, *p;
 
-   ifai = pool_get(ifaddr_item_pl, PR_WAITOK);
+   ifai = pool_get(ifaddr_item_pl, PR_NOWAIT);
ifai-ifai_addr = sa;
ifai-ifai_ifa = ifa;
ifai-ifai_rdomain = ifp-if_rdomain;



Re: /bsd: splassert: assertwaitok: want -1 have 1

2011-01-20 Thread Henning Brauer
* Mike Belopuhov m...@crypt.org.ru [2011-01-20 13:31]:
 seems like this is the only plausible way to fix it:
 
 - ifai = pool_get(ifaddr_item_pl, PR_WAITOK);
 + ifai = pool_get(ifaddr_item_pl, PR_NOWAIT);

no way. this has consequences you don't even envision.

ifa_add in int context is verboten, period. use a workq or sth. rtsol
has been fixed that way, pppoe apparently still needs that fix.

-- 
Henning Brauer, h...@bsws.de, henn...@openbsd.org
BS Web Services, http://bsws.de
Full-Service ISP - Secure Hosting, Mail and DNS Services
Dedicated Servers, Rootservers, Application Hosting



Re: /bsd: splassert: assertwaitok: want -1 have 1

2011-01-20 Thread Joel Sing
On Thursday 20 January 2011, Mike Belopuhov wrote:
 On Thu, Jan 20, 2011 at 10:31 +0200, Gregory Edigarov wrote:
  --- interrupt ---
  end trace frame: 0x0, count: 245
  0x8:
  End of stack trace.
  pppoe0: received unexpected PADO
  pppoe0: chap failure
  pppoe: GENERIC ERROR: RP-PPPoE: Child pppd process terminated
  pppoe0: received unexpected PADO
  pppoe0: chap failure
  pppoe: GENERIC ERROR: RP-PPPoE: Child pppd process terminated
  pppoe0: received unexpected PADO
  pppoe0: chap failure
  pppoe: GENERIC ERROR: RP-PPPoE: Child pppd process terminated
  pppoe0: received unexpected PADO
  splassert: assertwaitok: want -1 have 1
  Starting stack trace...
  assertwaitok() at assertwaitok+0x1c
  pool_get() at pool_get+0x95
  ifa_item_insert() at ifa_item_insert+0x35
  ifa_add() at ifa_add+0x43
  in_ifinit() at in_ifinit+0x16f
  sppp_set_ip_addrs() at sppp_set_ip_addrs+0x107
  sppp_ipcp_tlu() at sppp_ipcp_tlu+0x4e
  sppp_input() at sppp_input+0x594
  pppoeintr() at pppoeintr+0x41d
  netintr() at netintr+0x97
  softintr_dispatch() at softintr_dispatch+0x5d
  Xsoftnet() at Xsoftnet+0x28
  --- interrupt ---
  end trace frame: 0x0, count: 245
  0x8:
  End of stack trace.

 seems like this is the only plausible way to fix it:

 Index: net/if.c
 ===
 RCS file: /home/cvs/src/sys/net/if.c,v
 retrieving revision 1.231
 diff -u -p -r1.231 if.c
 --- net/if.c  29 Nov 2010 19:38:59 -  1.231
 +++ net/if.c  20 Jan 2011 11:11:53 -
 @@ -2213,7 +2213,7 @@ ifa_item_insert(struct sockaddr *sa, str
  {
   struct ifaddr_item  *ifai, *p;

 - ifai = pool_get(ifaddr_item_pl, PR_WAITOK);
 + ifai = pool_get(ifaddr_item_pl, PR_NOWAIT);
   ifai-ifai_addr = sa;
   ifai-ifai_ifa = ifa;
   ifai-ifai_rdomain = ifp-if_rdomain;

pool_get() with PR_NOWAIT... and then not checking the return value? That's 
got null pointer dereference written all over it... :)

However, the bigger problem is what can you then do if the pool_get() fails? 
This then results in the interface address not being allocated and in most 
cases there is no way to propagate/handle the error. The solution here is to 
add the interface address from process context and not from interrupt 
context.
-- 

   Stop assuming that systems are secure unless demonstrated insecure;
start assuming that systems are insecure unless designed securely.
  - Bruce Schneier



Re: /bsd: splassert: assertwaitok: want -1 have 1

2011-01-20 Thread Mike Belopuhov
On Thu, Jan 20, 2011 at 1:57 PM, Joel Sing j...@sing.id.au wrote:
 pool_get() with PR_NOWAIT... and then not checking the return value? That's
 got null pointer dereference written all over it... :)

 However, the bigger problem is what can you then do if the pool_get() fails?
 This then results in the interface address not being allocated and in most
 cases there is no way to propagate/handle the error. The solution here is to
 add the interface address from process context and not from interrupt
 context.
 --

yes yes, i pushed reply button too soon this time (:



zap some dead code from bdes(1)

2011-01-20 Thread Jasper Lievisse Adriaanse
As per subject, since #define something test for in the very next line, makes
it clear the other code can go. No binary change of course. OK?

-- 
Cheers,
Jasper

Capable, generous men do not create victims, they nurture them.

Index: bdes.c
===
RCS file: /cvs/src/usr.bin/bdes/bdes.c,v
retrieving revision 1.16
diff -p -u -r1.16 bdes.c
--- bdes.c  27 Oct 2009 23:59:36 -  1.16
+++ bdes.c  20 Jan 2011 18:22:08 -
@@ -102,31 +102,12 @@ void  usage(void);
 #defineMEMZERO(dest,len)   bzero((dest),(len))
 
 /* Hide the calls to the primitive encryption routines. */
-#defineFASTWAY
-#ifdef FASTWAY
 #defineDES_KEY(buf) \
if (des_setkey(buf)) \
err(1, des_setkey);
 #defineDES_XFORM(buf) \
if (des_cipher(buf, buf, 0L, (inverse ? -1 : 1))) \
err(1, des_cipher);
-#else
-#defineDES_KEY(buf){   
\
-   char bits1[64]; /* bits of key */   \
-   expand(buf, bits1); \
-   if (setkey(bits1))  \
-   err(1, setkey);   \
-   }
-#defineDES_XFORM(buf)  {   
\
-   char bits1[64]; /* bits of message */   \
-   expand(buf, bits1); \
-   if (encrypt(bits1, inverse))\
-   err(1, encrypt);  \
-   compress(bits1, buf);   \
-   }
-void   expand(Desbuf, char *);
-void   compress(Desbuf, char *);
-#endif
 
 /*
  * this does an error-checking write
@@ -1009,36 +990,6 @@ cfbauth(void)
(void)putchar(CHAR(msgbuf, 0));
}
 }
-
-#ifndef FASTWAY
-/*
- * change from 8 bits/Uchar to 1 bit/Uchar
- */
-void
-expand(Desbuf from, char *to)
-{
-   int i, j;   /* counters in for loop */
-
-   for (i = 0; i  8; i++)
-   for (j = 0; j  8; j++)
-   *to++ = (CHAR(from, i)(7-j))01;
-}
-
-/*
- * change from 1 bit/char to 8 bits/Uchar
- */
-void
-compress(char *from, Desbuf to)
-{
-   int i, j;   /* counters in for loop */
-
-   for (i = 0; i  8; i++) {
-   CHAR(to, i) = 0;
-   for (j = 0; j  8; j++)
-   CHAR(to, i) = ((*from++)(7-j))|CHAR(to, i);
-   }
-}
-#endif
 
 extern char *__progname;
 /*



recieve - receive (sys/)

2011-01-20 Thread Jasper Lievisse Adriaanse
Hi,

Obvious typo, though the pxe.h parts may have to wait untill after the lock?
Otherwise OK?

-- 
Cheers,
Jasper

Capable, generous men do not create victims, they nurture them.

Index: arch/i386/stand/libsa/pxe.h
===
RCS file: /cvs/src/sys/arch/i386/stand/libsa/pxe.h,v
retrieving revision 1.5
diff -p -u -r1.5 pxe.h
--- arch/i386/stand/libsa/pxe.h 20 Nov 2010 20:11:19 -  1.5
+++ arch/i386/stand/libsa/pxe.h 20 Jan 2011 22:30:49 -
@@ -330,7 +330,7 @@ typedef struct {
PXENV_STATUS_t  Status;
uint16_tFuncFlag;   /* PXENV_UNDI_ISR_OUT_xxx */
uint16_tBufferLength;   /* Length of Frame */
-   uint16_tFrameLength;/* Total length of reciever
+   uint16_tFrameLength;/* Total length of receiver
   frame */
uint16_tFrameHeaderLength;  /* Length of the media header
   in Frame */
@@ -351,7 +351,7 @@ typedef struct {
 */
 #  define PXENV_UNDI_ISR_OUT_DONE  0
 #  define PXENV_UNDI_ISR_OUT_TRANSMIT  2
-#  define PXENV_UNDI_ISR_OUT_RECIEVE   3
+#  define PXENV_UNDI_ISR_OUT_RECEIVE   3
 #  define PXENV_UNDI_ISR_OUT_BUSY  4
 } __packed t_PXENV_UNDI_ISR;
 
Index: arch/amd64/stand/libsa/pxe.h
===
RCS file: /cvs/src/sys/arch/amd64/stand/libsa/pxe.h,v
retrieving revision 1.5
diff -p -u -r1.5 pxe.h
--- arch/amd64/stand/libsa/pxe.h20 Nov 2010 20:11:19 -  1.5
+++ arch/amd64/stand/libsa/pxe.h20 Jan 2011 22:30:49 -
@@ -330,7 +330,7 @@ typedef struct {
PXENV_STATUS_t  Status;
uint16_tFuncFlag;   /* PXENV_UNDI_ISR_OUT_xxx */
uint16_tBufferLength;   /* Length of Frame */
-   uint16_tFrameLength;/* Total length of reciever
+   uint16_tFrameLength;/* Total length of receiver
   frame */
uint16_tFrameHeaderLength;  /* Length of the media header
   in Frame */
@@ -351,7 +351,7 @@ typedef struct {
 */
 #  define PXENV_UNDI_ISR_OUT_DONE  0
 #  define PXENV_UNDI_ISR_OUT_TRANSMIT  2
-#  define PXENV_UNDI_ISR_OUT_RECIEVE   3
+#  define PXENV_UNDI_ISR_OUT_RECEIVE   3
 #  define PXENV_UNDI_ISR_OUT_BUSY  4
 } __packed t_PXENV_UNDI_ISR;
 
Index: dev/pci/drm/drmP.h
===
RCS file: /cvs/src/sys/dev/pci/drm/drmP.h,v
retrieving revision 1.126
diff -p -u -r1.126 drmP.h
--- dev/pci/drm/drmP.h  18 Jul 2010 21:01:06 -  1.126
+++ dev/pci/drm/drmP.h  20 Jan 2011 22:30:49 -
@@ -324,7 +324,7 @@ struct drm_vblank_info {
u_int32_tvb_max;/* counter reg size */
struct drm_vblank {
struct drmevlist vbl_events;/* vblank events */
-   u_int32_tvbl_last;  /* Last recieved */
+   u_int32_tvbl_last;  /* Last received */
u_int32_tvbl_count; /* interrupt no. */
int  vbl_refs;  /* Number of users */
int  vbl_enabled;   /* Enabled? */
Index: dev/usb/utwitch.c
===
RCS file: /cvs/src/sys/dev/usb/utwitch.c,v
retrieving revision 1.2
diff -p -u -r1.2 utwitch.c
--- dev/usb/utwitch.c   19 Dec 2010 21:32:58 -  1.2
+++ dev/usb/utwitch.c   20 Jan 2011 22:30:49 -
@@ -250,7 +250,7 @@ utwitch_intr(struct uhidev *addr, void *
switch (buf[0]) {
case CMD_ACK:
if (buf[1] == sc-issueing_cmd) {
-   DPRINTF((ack recieved for cmd 0x%.2x\n, buf[1]));
+   DPRINTF((ack received for cmd 0x%.2x\n, buf[1]));
sc-accepted_cmd = buf[1];
} else {
DPRINTF((cmd-ack mismatch: recved 0x%.2x, expect 
0x%.2x\n,



recieve - receive (usr.sbin)

2011-01-20 Thread Jasper Lievisse Adriaanse
OK?

-- 
Cheers,
Jasper

Capable, generous men do not create victims, they nurture them.

Index: npppd/l2tp/l2tp_call.c
===
RCS file: /cvs/src/usr.sbin/npppd/l2tp/l2tp_call.c,v
retrieving revision 1.6
diff -p -u -r1.6 l2tp_call.c
--- npppd/l2tp/l2tp_call.c  24 Sep 2010 14:50:30 -  1.6
+++ npppd/l2tp/l2tp_call.c  20 Jan 2011 22:34:37 -
@@ -155,7 +155,7 @@ l2tp_call_disconnect(l2tp_call *_this, i
  * control packet
  */
 
-/* call it when control packet is recieved */
+/* call it when control packet is received */
 int
 l2tp_call_recv_packet(l2tp_ctrl *ctrl, l2tp_call *_this, int mestype,
 u_char *pkt, int pktlen)
Index: npppd/l2tp/l2tp_ctrl.c
===
RCS file: /cvs/src/usr.sbin/npppd/l2tp/l2tp_ctrl.c,v
retrieving revision 1.5
diff -p -u -r1.5 l2tp_ctrl.c
--- npppd/l2tp/l2tp_ctrl.c  24 Sep 2010 14:50:30 -  1.5
+++ npppd/l2tp/l2tp_ctrl.c  20 Jan 2011 22:34:38 -
@@ -535,7 +535,7 @@ l2tp_ctrl_timeout(int fd, short evtype, 
curr_time - _this-last_snd_ctrl =
L2TP_CTRL_WAIT_CALL_TIMEOUT) {
if (_this-ncalls == 0)
-   /* fail to recieve first call */
+   /* fail to receive first call */
l2tp_ctrl_log(_this, LOG_WARNING,
timeout waiting call);
l2tp_ctrl_stop(_this,
@@ -706,7 +706,7 @@ l2tp_ctrl_reset_timeout(l2tp_ctrl *_this
 /*
  * protocols / send and receive
  */
-/* Recieve packet */
+/* Receive packet */
 void
 l2tp_ctrl_input(l2tpd *_this, int listener_index, struct sockaddr *peer,
 struct sockaddr *sock, void *nat_t_ctx, u_char *pkt, int pktlen)
@@ -1037,7 +1037,7 @@ l2tp_ctrl_input(l2tpd *_this, int listen
/*
 * RFC specifies that sent of StopCCN in the state,
 * However as this implementation only support Passive
-* open, this packet will not recieved.
+* open, this packet will not received.
 */
/* FALLTHROUGH */
case L2TP_AVP_MESSAGE_TYPE_SCCCN:
Index: npppd/npppd/eap.c
===
RCS file: /cvs/src/usr.sbin/npppd/npppd/eap.c,v
retrieving revision 1.5
diff -p -u -r1.5 eap.c
--- npppd/npppd/eap.c   22 Sep 2010 11:48:38 -  1.5
+++ npppd/npppd/eap.c   20 Jan 2011 22:34:38 -
@@ -236,7 +236,7 @@ eap_input(eap *_this, unsigned char *pkt
if (code == EAP_FAILURE) {
/* discard */
eap_log(_this, LOG_NOTICE,
-   Recieved unexpected packet from peer (code = %d), code);
+   Received unexpected packet from peer (code = %d), code);
return;
}
 
@@ -292,11 +292,11 @@ eap_input(eap *_this, unsigned char *pkt
  * discard
  */
eap_log(_this, LOG_DEBUG,
-   recieve eap length = %d, 
+   receive eap length = %d, 
eap info: code = %d, id = %d, length = %d, type = %d, 
name length = %d,
len, code, id, length, type, _this-name_len );
-eap_log(_this, LOG_NOTICE, Recieved unexpected eap packet from peer);
+eap_log(_this, LOG_NOTICE, Received unexpected eap packet from peer);
return;
 }
 
Index: npppd/pptp/pptp.h
===
RCS file: /cvs/src/usr.sbin/npppd/pptp/pptp.h,v
retrieving revision 1.4
diff -p -u -r1.4 pptp.h
--- npppd/pptp/pptp.h   2 Jul 2010 21:20:57 -   1.4
+++ npppd/pptp/pptp.h   20 Jan 2011 22:34:38 -
@@ -300,7 +300,7 @@ typedef struct _pptp_call {
pptp_ctrl   *ctrl; /* parent */
unsignedid;
 
-   int ifidx; /* recieve interface index */
+   int ifidx; /* receive interface index */
 
int state;
 
@@ -310,8 +310,8 @@ typedef struct _pptp_call {
uint32_tsnd_una;/* next ack notification */
uint32_tsnd_nxt;/* next transmit sequence # */
 
-   uint32_trcv_nxt;/* recieved sequence # */
-   uint32_trcv_acked;  /* latest acked recieved sequence # */
+   uint32_trcv_nxt;/* received sequence # */
+   uint32_trcv_acked;  /* latest acked received sequence # */
 
int winsz;  /* current window size */
int maxwinsz;   /* maximum window size */
Index: npppd/pptp/pptpd.c
===
RCS file: /cvs/src/usr.sbin/npppd/pptp/pptpd.c,v
retrieving revision 1.7
diff -p -u -r1.7 pptpd.c
--- npppd/pptp/pptpd.c  27 Sep 2010 00:12:16 -  1.7
+++ 

Re: Workaround for data corruption issue with ALI M5229 IDE chip used with Sun Blade 100/Netra X1.

2011-01-20 Thread Brad
On Wed, Jan 12, 2011 at 08:32:12PM -0500, Brad wrote:
 The following diff is ported from NetBSD (the workaround originated from
 OpenSolaris) to workaround the issue of data corruption with the ALI M5229
 IDE chipset when using UltraDMA. Same workaround is also used by 
 FreeBSD/Linux.
 This chipset is found in some sparc64 systems such as the Blade 100 and
 Netra X1.
 
 I don't have any such systems but I went digging for this being curious
 why the nasty hack was added to the kernel configs to disable UltraDMA
 to workaround this bug and thus penalizing other IDE/SATA controllers
 that could be in the same system. If you have one of the mentioned
 systems please test this.

Here is the alternate workaround for the time being.

Please test.


Index: dev/pci/pciide.c
===
RCS file: /home/cvs/src/sys/dev/pci/pciide.c,v
retrieving revision 1.323
diff -u -p -r1.323 pciide.c
--- dev/pci/pciide.c18 Nov 2010 18:12:52 -  1.323
+++ dev/pci/pciide.c21 Jan 2011 00:19:49 -
@@ -5639,6 +5639,10 @@ acer_chip_map(struct pciide_softc *sc, s
sc-sc_wdcdev.cap |= WDC_CAPABILITY_UDMA;
if (rev = 0xC4)
sc-sc_wdcdev.UDMA_cap = 5;
+#ifdef __sparc64__
+   else if (rev == 0xC3)
+   sc-sc_wdcdev.UDMA_cap = 2;
+#endif
else if (rev = 0xC2)
sc-sc_wdcdev.UDMA_cap = 4;
else
Index: arch/sparc64/conf/GENERIC
===
RCS file: /home/cvs/src/sys/arch/sparc64/conf/GENERIC,v
retrieving revision 1.262
diff -u -p -r1.262 GENERIC
--- arch/sparc64/conf/GENERIC   8 Jan 2011 11:56:30 -   1.262
+++ arch/sparc64/conf/GENERIC   15 Jan 2011 18:44:11 -
@@ -382,7 +382,7 @@ stty*   at spif?
 sbpp*  at spif?
 
 pciide*at pci? flags 0x
-wd*at pciide? flags 0x0a00
+wd*at pciide? flags 0x
 atapiscsi* at pciide?
 scsibus* at atapiscsi?
 
Index: arch/sparc64/conf/RAMDISK
===
RCS file: /home/cvs/src/sys/arch/sparc64/conf/RAMDISK,v
retrieving revision 1.98
diff -u -p -r1.98 RAMDISK
--- arch/sparc64/conf/RAMDISK   19 Apr 2010 10:44:33 -  1.98
+++ arch/sparc64/conf/RAMDISK   11 Jan 2011 23:41:13 -
@@ -151,7 +151,7 @@ ti* at sbus?
 gem*   at sbus?
 
 pciide*at pci? flags 0x
-wd*at pciide? flags 0x0a00
+wd*at pciide? flags 0x
 atapiscsi* at pciide?
 scsibus* at atapiscsi?
 
Index: arch/sparc64/conf/RAMDISKU5
===
RCS file: /home/cvs/src/sys/arch/sparc64/conf/RAMDISKU5,v
retrieving revision 1.16
diff -u -p -r1.16 RAMDISKU5
--- arch/sparc64/conf/RAMDISKU5 24 Jun 2009 11:38:40 -  1.16
+++ arch/sparc64/conf/RAMDISKU5 11 Jan 2011 23:41:30 -
@@ -55,7 +55,7 @@ pcons0at mainbus0 # PROM console
 timer* at mainbus0 # Timer chip (some systems)
 
 pciide*at pci? flags 0x
-wd*at pciide? flags 0x0a00
+wd*at pciide? flags 0x
 atapiscsi* at pciide?
 scsibus* at atapiscsi?
 

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



Re: Workaround for data corruption issue with ALI M5229 IDE chip used with Sun Blade 100/Netra X1.

2011-01-20 Thread Ted Unangst
On Thu, Jan 20, 2011 at 7:57 PM, Brad b...@comstyle.com wrote:
 Here is the alternate workaround for the time being.

 +#ifdef __sparc64__
 +   else if (rev == 0xC3)
 +   sc-sc_wdcdev.UDMA_cap = 2;
 +#endif

I know miod suggested the ifdef, but is there any benefit?  Is there
any reason to believe whatever this bug is doesn't affect the same
silicon on i386?  (Or that the same rev is different silicon?)  On the
flipside, besides being a little slower, is there any harm to i386 by
enabling the cap?



Re: recieve - receive (usr.sbin)

2011-01-20 Thread Kenneth R Westerback
On Thu, Jan 20, 2011 at 11:35:40PM +0100, Jasper Lievisse Adriaanse wrote:
 OK?

ok krw@ as in last one.

 Ken

 
 -- 
 Cheers,
 Jasper
 
 Capable, generous men do not create victims, they nurture them.
 
 Index: npppd/l2tp/l2tp_call.c
 ===
 RCS file: /cvs/src/usr.sbin/npppd/l2tp/l2tp_call.c,v
 retrieving revision 1.6
 diff -p -u -r1.6 l2tp_call.c
 --- npppd/l2tp/l2tp_call.c24 Sep 2010 14:50:30 -  1.6
 +++ npppd/l2tp/l2tp_call.c20 Jan 2011 22:34:37 -
 @@ -155,7 +155,7 @@ l2tp_call_disconnect(l2tp_call *_this, i
   * control packet
   */
  
 -/* call it when control packet is recieved */
 +/* call it when control packet is received */
  int
  l2tp_call_recv_packet(l2tp_ctrl *ctrl, l2tp_call *_this, int mestype,
  u_char *pkt, int pktlen)
 Index: npppd/l2tp/l2tp_ctrl.c
 ===
 RCS file: /cvs/src/usr.sbin/npppd/l2tp/l2tp_ctrl.c,v
 retrieving revision 1.5
 diff -p -u -r1.5 l2tp_ctrl.c
 --- npppd/l2tp/l2tp_ctrl.c24 Sep 2010 14:50:30 -  1.5
 +++ npppd/l2tp/l2tp_ctrl.c20 Jan 2011 22:34:38 -
 @@ -535,7 +535,7 @@ l2tp_ctrl_timeout(int fd, short evtype, 
   curr_time - _this-last_snd_ctrl =
   L2TP_CTRL_WAIT_CALL_TIMEOUT) {
   if (_this-ncalls == 0)
 - /* fail to recieve first call */
 + /* fail to receive first call */
   l2tp_ctrl_log(_this, LOG_WARNING,
   timeout waiting call);
   l2tp_ctrl_stop(_this,
 @@ -706,7 +706,7 @@ l2tp_ctrl_reset_timeout(l2tp_ctrl *_this
  /*
   * protocols / send and receive
   */
 -/* Recieve packet */
 +/* Receive packet */
  void
  l2tp_ctrl_input(l2tpd *_this, int listener_index, struct sockaddr *peer,
  struct sockaddr *sock, void *nat_t_ctx, u_char *pkt, int pktlen)
 @@ -1037,7 +1037,7 @@ l2tp_ctrl_input(l2tpd *_this, int listen
   /*
* RFC specifies that sent of StopCCN in the state,
* However as this implementation only support Passive
 -  * open, this packet will not recieved.
 +  * open, this packet will not received.
*/
   /* FALLTHROUGH */
   case L2TP_AVP_MESSAGE_TYPE_SCCCN:
 Index: npppd/npppd/eap.c
 ===
 RCS file: /cvs/src/usr.sbin/npppd/npppd/eap.c,v
 retrieving revision 1.5
 diff -p -u -r1.5 eap.c
 --- npppd/npppd/eap.c 22 Sep 2010 11:48:38 -  1.5
 +++ npppd/npppd/eap.c 20 Jan 2011 22:34:38 -
 @@ -236,7 +236,7 @@ eap_input(eap *_this, unsigned char *pkt
   if (code == EAP_FAILURE) {
   /* discard */
   eap_log(_this, LOG_NOTICE,
 - Recieved unexpected packet from peer (code = %d), code);
 + Received unexpected packet from peer (code = %d), code);
   return;
   }
  
 @@ -292,11 +292,11 @@ eap_input(eap *_this, unsigned char *pkt
   * discard
   */
   eap_log(_this, LOG_DEBUG,
 - recieve eap length = %d, 
 + receive eap length = %d, 
   eap info: code = %d, id = %d, length = %d, type = %d, 
   name length = %d,
   len, code, id, length, type, _this-name_len );
 -eap_log(_this, LOG_NOTICE, Recieved unexpected eap packet from 
 peer);
 +eap_log(_this, LOG_NOTICE, Received unexpected eap packet from 
 peer);
   return;
  }
  
 Index: npppd/pptp/pptp.h
 ===
 RCS file: /cvs/src/usr.sbin/npppd/pptp/pptp.h,v
 retrieving revision 1.4
 diff -p -u -r1.4 pptp.h
 --- npppd/pptp/pptp.h 2 Jul 2010 21:20:57 -   1.4
 +++ npppd/pptp/pptp.h 20 Jan 2011 22:34:38 -
 @@ -300,7 +300,7 @@ typedef struct _pptp_call {
   pptp_ctrl   *ctrl; /* parent */
   unsignedid;
  
 - int ifidx; /* recieve interface index */
 + int ifidx; /* receive interface index */
  
   int state;
  
 @@ -310,8 +310,8 @@ typedef struct _pptp_call {
   uint32_tsnd_una;/* next ack notification */
   uint32_tsnd_nxt;/* next transmit sequence # */
  
 - uint32_trcv_nxt;/* recieved sequence # */
 - uint32_trcv_acked;  /* latest acked recieved sequence # */
 + uint32_trcv_nxt;/* received sequence # */
 + uint32_trcv_acked;  /* latest acked received sequence # */
  
   int winsz;  /* current window size */
   int maxwinsz;   /* maximum window size */
 Index: npppd/pptp/pptpd.c
 ===
 RCS file: 

Re: nxe(4) comment fix

2011-01-20 Thread Brad
Still hasn't been commited. If there is a desire for a slightly different
wording just say so but otherwise the current comment is still wrong.


- Forwarded message from Brad b...@comstyle.com -

Date: Mon, 13 Sep 2010 22:10:03 -0400
From: Brad b...@comstyle.com
To: tech@openbsd.org
Subject: nxe(4) comment fix
User-Agent: Mutt/1.5.20 (2010-08-04)

There is a mistake with the comment beside the promiscuous mode flag
in nxe(4).


Index: if_nxe.c
===
RCS file: /home/cvs/src/sys/dev/pci/if_nxe.c,v
retrieving revision 1.61
diff -u -p -r1.61 if_nxe.c
--- if_nxe.c19 May 2010 15:27:35 -  1.61
+++ if_nxe.c1 Aug 2010 17:32:03 -
@@ -229,7 +229,7 @@ int nxedebug = 0;
 #define  NXE_0_XG_CFG1_PAUSE_FR_DIS(18) /* disable pause frame detect */
 #define  NXE_0_XG_CFG1_SEQ_ERR_EN  (110) /* enable seq err detection */
 #define  NXE_0_XG_CFG1_MULTICAST   (112) /* accept all multicast */
-#define  NXE_0_XG_CFG1_PROMISC (113) /* accept all multicast */
+#define  NXE_0_XG_CFG1_PROMISC (113) /* accept all frames */
 #define NXE_0_XG_IPG(_p)   (0x00670008 + _P(_p))
 #define NXE_0_XG_MAC_LO(_p)(0x00670010 + _P(_p))
 #define NXE_0_XG_MAC_HI(_p)(0x0067000c + _P(_p))

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


- End forwarded message -

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



Comment typo fix for gcc/alpha openbsd.h

2011-01-20 Thread Brad
Typo fix.


Index: openbsd.h
===
RCS file: /home/cvs/src/gnu/usr.bin/gcc/gcc/config/alpha/openbsd.h,v
retrieving revision 1.9
diff -u -p -r1.9 openbsd.h
--- openbsd.h   20 Oct 2010 20:25:33 -  1.9
+++ openbsd.h   21 Jan 2011 05:09:41 -
@@ -80,7 +80,7 @@ Boston, MA 02111-1307, USA.  */
 #undef STACK_CHECK_BUILTIN
 #define STACK_CHECK_BUILTIN 0
 
-/* OpenBSD doesn't currently supprot thread-local storage. */
+/* OpenBSD doesn't currently support thread-local storage. */
 /* alpha.c undefs TARGET_HAVE_TLS and redefines it to HAVE_AS_TLS !?!?! */
 #undef HAVE_AS_TLS
 #define HAVE_AS_TLS false

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



Nikon D7000 y Canon EOS 60D

2011-01-20 Thread DigitalesNet
USD2100   Nikon 
D7000  Tipo  reacute;flex, objetivos
intercambiables / Sensor  CMOS de 16,20 MP
efectivos / Tamantilde;o sensor  23,60 x
15,60 mm / Montura Nikon - Kit 18-105  /
Factor de multiplicacioacute;n 1,50x / Pantalla
 TFT de 3,00 pulgadasUSD1730   Canon
 EOS 60D Kit 18-135 Tipo
 reacute;flex, objetivos intercambiables / Sensor  
   CMOS de 18,00 MP efectivos / Tamantilde;o sensor
 22,30 x 14,90 mm / Montura Canon EF-S -Kit 18-135  
   / Factor de multiplicacioacute;n 1,60x /
Pantalla  TFT de 3,00 pulgadas



Add Atheros F1 and F2 PHYs

2011-01-20 Thread Kevin Lo
Hi,

This diff from FreeBSD adds Atheros F1 and F2 phys.

Index: atphy.c
===
RCS file: /cvs/src/sys/dev/mii/atphy.c,v
retrieving revision 1.4
diff -u -p -r1.4 atphy.c
--- atphy.c 25 Jul 2009 12:23:40 -  1.4
+++ atphy.c 21 Jan 2011 06:47:03 -
@@ -81,9 +81,13 @@ const struct mii_phy_funcs atphy_funcs =
 atphy_service, atphy_status, atphy_reset,
 };
 
-static const struct mii_phydesc etphys[] = {
+static const struct mii_phydesc atphys[] = {
{ MII_OUI_ATHEROS,  MII_MODEL_ATHEROS_F1,
  MII_STR_ATHEROS_F1 },
+   { MII_OUI_ATHEROS,  MII_MODEL_ATHEROS_F1_7,
+ MII_STR_ATHEROS_F1_7 },
+   { MII_OUI_ATHEROS,  MII_MODEL_ATHEROS_F2,
+ MII_STR_ATHEROS_F2 },
{ 0,0,
  NULL },
 };
@@ -102,7 +106,7 @@ atphy_match(struct device *parent, void 
 {
struct mii_attach_args *ma = aux;
 
-   if (mii_phy_match(ma, etphys) != NULL)
+   if (mii_phy_match(ma, atphys) != NULL)
return (10);
 
return (0);
@@ -116,7 +120,7 @@ atphy_attach(struct device *parent, stru
struct mii_data *mii = ma-mii_data;
const struct mii_phydesc *mpd;
 
-   mpd = mii_phy_match(ma, etphys);
+   mpd = mii_phy_match(ma, atphys);
printf(: %s, rev. %d\n, mpd-mpd_name, MII_REV(ma-mii_id2));
 
sc-mii_inst = mii-mii_instance;
Index: miidevs
===
RCS file: /cvs/src/sys/dev/mii/miidevs,v
retrieving revision 1.115
diff -u -p -r1.115 miidevs
--- miidevs 15 Jan 2011 04:35:34 -  1.115
+++ miidevs 21 Jan 2011 06:47:04 -
@@ -120,6 +120,7 @@ model AGERE ET1011  0x0004  ET1011 10/100
 /* Atheros PHYs */
 model ATHEROS F1   0x0001  F1 10/100/1000 PHY
 model ATHEROS F2   0x0002  F2 10/100 PHY
+model ATHEROS F1_7 0x0007  F1 10/100/1000 PHY
 
 /* Altima PHYs */
 model xxALTIMA AC_UNKNOWN  0x0001  AC_UNKNOWN 10/100 PHY