Re: CVS commit: src/sys/dev/usb

2016-07-02 Thread Takahiro Hayashi

On 2016/07/01 21:16, Nick Hudson wrote:

Module Name:src
Committed By:   skrll
Date:   Fri Jul  1 12:16:36 UTC 2016

Modified Files:
src/sys/dev/usb: umass.c umass_quirks.c umass_scsipi.c umassvar.h

Log Message:
Convert umass(4) to usbhist.


If defined(USB_DEBUG) && !defined(UMASS_DEBUG), umass_scsipi.c cannot
build because umassdebug is not referred from umass_scsipi.c.


--
t-hash


Re: CVS commit: src/sys/dev/usb

2016-04-30 Thread Takahiro Hayashi

On 2016/05/01 00:00, Nick Hudson wrote:

Module Name:src
Committed By:   skrll
Date:   Sat Apr 30 15:00:24 UTC 2016

Modified Files:
src/sys/dev/usb: xhci.c

Log Message:
Cancel command when command times out.  From t-hash.

XXX interrupt context?


xhci_abort_command is currently called from only xhci_do_command.
If it was in interrupt context, KASSERMSG in xhci_do_command
and KASSERT in cv_enter would fire.


thanks,
--
t-hash


Re: CVS commit: src/sys

2016-04-09 Thread Takahiro Hayashi

On 2016/04/07 06:56, Nick Hudson wrote:

Log Message:
Improve ddb(4) show kernhist

1) really prints all the histories merged together (rather than just the
"first" when no argument specified
2) dumps a single history when an argument is given, e.g.
"show kernhist usbhist"
3) uses db_printf correctly



#define KERNHIST_DUMP(NAME) kernhist_dump()


This breaks build on earmv7hf: "too few arguments".
Missing something like printf?


thanks,
--
t-hash


Re: CVS commit: [netbsd-7] src/sys

2015-11-05 Thread Takahiro Hayashi

Hi,

On 2015/11/05 02:46, Jeff Rizzo wrote:

Module Name:src
Committed By:   riz
Date:   Wed Nov  4 17:46:21 UTC 2015

Modified Files:
src/sys/compat/netbsd32 [netbsd-7]: files.netbsd32 netbsd32.h
netbsd32_conv.h netbsd32_syscall.h netbsd32_syscallargs.h
netbsd32_syscalls.c netbsd32_sysent.c syscalls.master
src/sys/nfs [netbsd-7]: nfs_syscalls.c nfs_var.h
Added Files:
src/sys/compat/netbsd32 [netbsd-7]: netbsd32_nfssvc.c


If conf file doesn't have options NFSSERVER, build fails on amd64:


netbsd32_sysent.o:(.data+0x9b8): undefined reference to `netbsd32_nfssvc'


Should compat/netbsd32/syscalls.master be same as in HEAD?


Thanks,
--
t-hash


Re: CVS commit: src/sys/dev/usb

2015-05-29 Thread takahiro hayashi

On 2015/05/28 18:06, Nick Hudson wrote:

Module Name:src
Committed By:   skrll
Date:   Thu May 28 09:06:36 UTC 2015

Modified Files:
src/sys/dev/usb: usb.c

Log Message:
Static initialise usbhist - it can be used by controller drivers, i.e.
before usb attaches.


Is KERNHIST_LINK_STATIC needed instead of USBHIST_INIT
to register usbhist to kern_histories?


thanks,
--
t-hash


Re: CVS commit: [netbsd-7] src/sys/dev/pci

2015-04-19 Thread Takahiro HAYASHI

On 2015/04/19 15:45, Jeff Rizzo wrote:

Module Name:src
Committed By:   riz
Date:   Sun Apr 19 06:45:17 UTC 2015

Modified Files:
src/sys/dev/pci [netbsd-7]: files.pci
src/sys/dev/pci/ixgbe [netbsd-7]: ixgbe.c ixgbe.h ixgbe_82598.c
ixgbe_82599.c ixgbe_api.c ixgbe_api.h ixgbe_common.c ixgbe_common.h
ixgbe_mbx.c ixgbe_mbx.h ixgbe_osdep.h ixgbe_phy.c ixgbe_phy.h
ixgbe_type.h ixgbe_vf.c ixgbe_vf.h ixv.c ixv.h


missing newly added ixgbe_8259[89].h and ixgbe_x540.[ch] ?




Log Message:
Apply patch (requested by msaitoh in ticket #697):
sys/dev/pci/files.pci   1.375 via patch
sys/dev/pci/ixgbe/ixgbe.c   1.24-1.27 via patch
sys/dev/pci/ixgbe/ixgbe.h   1.4-1.6 via patch
sys/dev/pci/ixgbe/ixgbe_82598.c 1.2-1.3 via patch
sys/dev/pci/ixgbe/ixgbe_82598.h 1.1-1.2 via patch
sys/dev/pci/ixgbe/ixgbe_82599.c 1.6-1.8 via patch
sys/dev/pci/ixgbe/ixgbe_82599.h 1.1 via patch
sys/dev/pci/ixgbe/ixgbe_api.c   1.5-1.6 via patch
sys/dev/pci/ixgbe/ixgbe_api.h   1.2-1.3 via patch
sys/dev/pci/ixgbe/ixgbe_common.c1.3-1.4 via patch
sys/dev/pci/ixgbe/ixgbe_common.h1.2-1.3 via patch
sys/dev/pci/ixgbe/ixgbe_mbx.c   1.2-1.3 via patch
sys/dev/pci/ixgbe/ixgbe_mbx.h   1.2-1.3 via patch
sys/dev/pci/ixgbe/ixgbe_osdep.h 1.4-1.6 via patch
sys/dev/pci/ixgbe/ixgbe_phy.c   1.3-1.4 via patch
sys/dev/pci/ixgbe/ixgbe_phy.h   1.2-1.3 via patch
sys/dev/pci/ixgbe/ixgbe_type.h  1.8-1.9 via patch
sys/dev/pci/ixgbe/ixgbe_vf.c1.2-1.3 via patch
sys/dev/pci/ixgbe/ixgbe_vf.h1.3-1.4 via patch
sys/dev/pci/ixgbe/ixgbe_x540.c  1.1-1.2 via patch
sys/dev/pci/ixgbe/ixgbe_x540.h  1.1 via patch
sys/dev/pci/ixgbe/ixv.c 1.5-1.7 via patch
sys/dev/pci/ixgbe/ixv.h 1.4-1.5 via patch

Synchronize our ixg(4) driver up to FreeBSD r243716:
 - Add X540 support.
 - Add TSO6 support.
 - Add 100BaseTX support.
 - The max size in dma tag is changed from 65535 to 262140 
(IXGBE_TSO_SIZE).
   The value is the same as other *BSDs. The change might cause a 
address
   space shortage (ixgbe_dmamap_create() might fail) on some machines.
 - Show 1000Base-SX correctly.
 - Fix if_baudrate from 1G to 10G.
 - Fix a bug that ifconfig -z (SOICZIFDATA) doesn't work.
 - Fix a lot of bugs.
 - Improve performance.
[msaitoh, ticket #697]



--
t-hash


Re: CVS commit: [netbsd-7] src/sys/dev/i2c

2015-04-14 Thread Takahiro HAYASHI

Thank you for pulling up!

On 2015/04/14 13:24, Soren Jacobsen wrote:

Module Name:src
Committed By:   snj
Date:   Tue Apr 14 04:24:58 UTC 2015

Modified Files:
src/sys/dev/i2c [netbsd-7]: ds1307.c ds1307reg.h

Log Message:
Pull up following revision(s) (requested by nonaka in ticket #672):
sys/dev/i2c/ds1307.c: revisions 1.19, 1.20
sys/dev/i2c/ds1307reg.h: revision 1.5
- support DS3231 ( more or less a DS3232 without NVRAM it seems )
- support the DS3231's temperature sensor
--
Initialize a variable that gcc thinks might be used uninitialized.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.18.2.1 src/sys/dev/i2c/ds1307.c
cvs rdiff -u -r1.4 -r1.4.14.1 src/sys/dev/i2c/ds1307reg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



--
t-hash


Re: CVS commit: [nick-nhusb] src/sys/dev/usb

2015-04-04 Thread Takahiro HAYASHI

On 2015/04/04 06:33, Nick Hudson wrote:

Module Name:src
Committed By:   skrll
Date:   Fri Apr  3 21:33:23 UTC 2015

Modified Files:
src/sys/dev/usb [nick-nhusb]: uhci.c

Log Message:
Various readability changes.

#ifdef DIAGNOSTIC - KASSERT / __diagused



@@ -3151,10 +3105,8 @@ uhci_device_ctrl_done(struct usbd_xfer *
KASSERT(sc-sc_bus.ub_usepolling || mutex_owned(sc-sc_lock));

UHCIHIST_FUNC(); UHCIHIST_CALLED();
-#ifdef DIAGNOSTIC
-   if (!(xfer-ux_rqflags  URQ_REQUEST))
-   panic(uhci_device_ctrl_done: not a request);
-#endif
+
+   KASSERT(!(xfer-ux_rqflags  URQ_REQUEST));

if (!uhci_active_intr_info(ii))
return;


It seems logic is inverted.


--
t-hash


Re: CVS commit: [nick-nhusb] src/sys/dev/usb

2015-03-06 Thread Takahiro HAYASHI

On 2015/03/06 21:55, Nick Hudson wrote:

On 03/06/15 11:36, Takahiro HAYASHI wrote:

On 2015/03/05 21:39, Nick Hudson wrote:

Modified Files:
src/sys/dev/usb [nick-nhusb]: usbdi.c

Log Message:
Minor USBHIST_LOG changes



/* Sync transfer, wait for completion. */
if (err != USBD_IN_PROGRESS) {
-USBHIST_LOG(usbdebug, - done xfer %p, not in progress, xfer,
+USBHIST_LOG(usbdebug, - done xfer %p, err %d (complete/error), xfer,
0, 0, 0);
return err;
}


Do you want to print 'err' instead of 0?


Fixed. Thanks.


BTW, typeof err is usbd_status so ENOMEM is not suitable.




I fixed one place where this was a problem - did you spot others?


usbd_do_request_flags_pipe returns ENOMEM around line 1084
but it should return usbd_status.


Thanks,
--
t-hash


Re: CVS commit: [nick-nhusb] src/sys/dev/usb

2015-03-06 Thread Takahiro HAYASHI

On 2015/03/05 21:39, Nick Hudson wrote:

Modified Files:
src/sys/dev/usb [nick-nhusb]: usbdi.c

Log Message:
Minor USBHIST_LOG changes



/* Sync transfer, wait for completion. */
if (err != USBD_IN_PROGRESS) {
-   USBHIST_LOG(usbdebug, - done xfer %p, not in progress, xfer,
+   USBHIST_LOG(usbdebug, - done xfer %p, err %d 
(complete/error), xfer,
0, 0, 0);
return err;
}


Do you want to print 'err' instead of 0?

BTW, typeof err is usbd_status so ENOMEM is not suitable.


--
t-hash


Re: CVS commit: src/distrib/utils/embedded/conf

2015-02-12 Thread Takahiro HAYASHI

On 2015/02/07 00:15, Jared D. McNeill wrote:

Module Name:src
Committed By:   jmcneill
Date:   Fri Feb  6 15:15:02 UTC 2015

Modified Files:
src/distrib/utils/embedded/conf: rpi.conf

Log Message:
By default, RPI firmware sets the max CPU frequency to 600MHz. This can be
overridden by setting arm_freq in config.txt, but the default freq at boot
is still 600MHz.

Add logic to rc.local to compare the current vs. max CPU frequency; if they
differ, set the target frequency to the maximum.



+   cat  /tmp/a  EOF


This overrides /tmp/a if it exists, and surprises original owner.
Is this change intended? AFAICS this file is not used.


regards,
--
t-hash


Re: CVS commit: [nick-nhusb] src/sys

2014-12-07 Thread Takahiro HAYASHI

On 12/03/14 23:18, Nick Hudson wrote:

Log Message:
Replace malloc(9) with kmem(9)


In file sys/dev/usb/uaudio.c, size of memory to be freed
should be like this as far as i see above line, or it would panic.

Index: src/sys/dev/usb/uaudio.c
===
RCS file: /cvsroot/src/sys/dev/usb/uaudio.c,v
retrieving revision 1.140.2.4
diff -u -p -r1.140.2.4 uaudio.c
--- src/sys/dev/usb/uaudio.c3 Dec 2014 14:18:07 -   1.140.2.4
+++ src/sys/dev/usb/uaudio.c7 Dec 2014 14:23:32 -
@@ -1540,8 +1541,7 @@ uaudio_add_alt(struct uaudio_softc *sc,
/* Copy old data, if there was any */
if (sc-sc_nalts != 0) {
memcpy(nai, sc-sc_alts, sizeof(*ai) * (sc-sc_nalts));
-   kmem_free(sc-sc_alts,
-   sizeof(struct audio_format) * sc-sc_nalts);
+   kmem_free(sc-sc_alts, sizeof(struct as_info) * sc-sc_nalts);
}
sc-sc_alts = nai;
DPRINTFN(2,adding alt=%d, enc=%d\n,


--
t-hash


Re: CVS commit: src/usr.bin/config

2014-10-30 Thread Takahiro HAYASHI

On 10/30/14 10:36, Christos Zoulas wrote:

Module Name:src
Committed By:   christos
Date:   Thu Oct 30 01:36:13 UTC 2014

Modified Files:
src/usr.bin/config: mkheaders.c

Log Message:
print more info about the overflow


It panics on amd64 when negative value is specified like RTC_OFFSET=-540.

/build/head/obj.amd64/tooldir.NetBSD-7.99.1-amd64/bin/nbconfig: panic: overflow 
-540 = 0xfde4

Thanks,
--
t-hash


Re: CVS commit: src/sys/dev/usb

2014-08-11 Thread Takahiro HAYASHI

On 08/11/14 19:37, Nick Hudson wrote:

Module Name:src
Committed By:   skrll
Date:   Mon Aug 11 10:37:59 UTC 2014

Modified Files:
src/sys/dev/usb: xhci.c

Log Message:
PR/49091: xhci: wrong wMaxPacketSize value

While this is correct according to the specification only fixed sizes
are allowed, i.e. 512 for SS, etc. Maybe these should be used?


Thanks for fix this.
I think fixed value 512 should be used and other value
would be warned.

oops, xhci_configure_endpoint uses 512 for all speed
if !UE_INTERRUPT.


--
t-hash


Re: CVS commit: src/sys

2014-08-05 Thread Takahiro HAYASHI

(08/05/14 17:33), Nick Hudson wrote:

Module Name:src
Committed By:   skrll
Date:   Tue Aug  5 08:33:50 UTC 2014

Modified Files:
src/sys/dev/usb: ohci.c xhci.c
src/sys/external/bsd/dwc2: dwc2.c

Log Message:
Prevent the root hub sending updates once the root interrupt abort is
called.


sc in {ehci,ohci,xhci}_root_intr_abort is now used always,
so #ifdef DIAGNOSTIC should be removed.


Thanks,
--
t-hash


Re: CVS commit: src/sys/net

2014-07-30 Thread Takahiro HAYASHI

(07/28/14 23:24), Ryota Ozaki wrote:

Module Name:src
Committed By:   ozaki-r
Date:   Mon Jul 28 14:24:48 UTC 2014

Modified Files:
src/sys/net: if.c if_ether.h if_ethersubr.c

Log Message:
Add a mutex for global variables of if_ethersubr.c

To initialize the mutex, we introduce etherinit that is called from ifinit1.


etherinit() would be undefined if kernel does
not have any ethernet interfaces like BEAGLEBOARDXM.

should be wrapped with something like #if NETHER  0 ?


--
t-hash


Re: CVS commit: src/sys/net

2014-07-30 Thread Takahiro HAYASHI

(07/30/14 22:37), Ryota Ozaki wrote:

On Wed, Jul 30, 2014 at 8:41 PM, Takahiro HAYASHI t.hash...@gmail.com wrote:

(07/28/14 23:24), Ryota Ozaki wrote:

To initialize the mutex, we introduce etherinit that is called from
ifinit1.



etherinit() would be undefined if kernel does
not have any ethernet interfaces like BEAGLEBOARDXM.

should be wrapped with something like #if NETHER  0 ?


Yes. I've just committed the fix. (It took long time to confirm
the fix...)


Ah, I did not read another thread of mails.
Thank you for fixing this.


--
t-hash


Re: CVS commit: src/sys/external/bsd/dwc2/dist

2014-07-26 Thread Takahiro HAYASHI

(07/26/14 18:18), Nick Hudson wrote:

Log Message:
Recover from channel halt errors by using the 3 strikes xacterr rule.

Adapted from the RaspberryPI linux driver.

This allows the rum(4) I was sent to be somewhat usable. Need to
investigate further what is causing the problem in the first place.

Might help PR/49019 (RPI: interrupt storm when url0 is up)


I tried this but still get intr storm when if is up.


--
t-hash


Re: CVS commit: src/sys

2014-07-14 Thread Takahiro HAYASHI

hello,

(07/09/14 13:54), Tyler R. Retzlaff wrote:

Module Name:src
Committed By:   rtr
Date:   Wed Jul  9 04:54:04 UTC 2014

Modified Files:
src/sys/compat/svr4: svr4_stream.c
src/sys/kern: uipc_syscalls.c uipc_usrreq.c
src/sys/net: if_gre.c link_proto.c raw_usrreq.c rtsock.c
src/sys/netatalk: ddp_usrreq.c
src/sys/netbt: hci_socket.c l2cap.h l2cap_socket.c l2cap_upper.c
rfcomm.h rfcomm_dlc.c rfcomm_session.c rfcomm_socket.c
rfcomm_upper.c sco.h sco_socket.c sco_upper.c
src/sys/netinet: raw_ip.c tcp_usrreq.c udp_usrreq.c
src/sys/netinet6: raw_ip6.c udp6_usrreq.c
src/sys/netipsec: keysock.c
src/sys/netmpls: mpls_proto.c
src/sys/netnatm: natm.c
src/sys/rump/net/lib/libsockin: sockin.c
src/sys/sys: param.h protosw.h socketvar.h

Log Message:
* split PRU_PEERADDR and PRU_SOCKADDR function out of pr_generic()
   usrreq switches and put into separate functions
   xxx_{peer,sock}addr(struct socket *, struct mbuf *).

 - KASSERT(solocked(so)) always in new functions even if request
   is not implemented


At line 597, 608 in raw_ip.c rev 1.132


KASSERT(solocked(0));


These always cause null pointer dereference.

--
t-hash


Re: CVS commit: src/usr.bin/netstat

2014-04-28 Thread Takahiro HAYASHI

hi,

(04/25/14 04:02), Christos Zoulas wrote: In article 
20140424191900.gp20...@snowdrop.l8s.co.uk,

David Laight  da...@l8s.co.uk wrote:

On Thu, Apr 24, 2014 at 10:56:29AM -0400, Christos Zoulas wrote:

Module Name:src
Committed By:   christos
Date:   Thu Apr 24 14:56:29 UTC 2014

Modified Files:
src/usr.bin/netstat: main.c route.c

Log Message:
The sysctl code does not support verbose route printing that prints the
internal route statistics. Restore the old kmem route printing code that
was not just used for post-mortem displays. Reported by kardel@, test by
netstat -nrvf inet


That seems a large backwards step...


No, the sysctl code is still used in the same cases as before. It
is only for the parts that are not supported by the sysctl code
that fail back to the kmem code (where the functionality was lost
when the code was deleted).


Are you guys interested in use_sysctl version of netstat -nrv code?
I think that's useful if kmem is not available.

Both struct rtentry from kmem and struct rt_msghdr from sysctl
has struct rt_metrics.  This code splits printing rt_metrics
and allows call from both paths.
To check both paths, try netstat -nrv -X and netstat -nrv -g.
(side effect of -g causes use_sysctl=0)

Index: src/usr.bin/netstat/main.c
===
RCS file: /cvsroot/src/usr.bin/netstat/main.c,v
retrieving revision 1.89
diff -u -p -r1.89 main.c
--- src/usr.bin/netstat/main.c24 Apr 2014 14:56:29 -1.89
+++ src/usr.bin/netstat/main.c25 Apr 2014 20:19:28 -
@@ -356,7 +356,6 @@ prepare(const char *nf, const char *mf,
 #ifndef SMALL
gflag ||
 #endif
-   (rflag  vflag) ||
(pflag  tp-pr_sindex == N_PIMSTAT) ||
Pflag) {
 /* These flags are not yet supported via sysctl(3). */
Index: src/usr.bin/netstat/netstat.h
===
RCS file: /cvsroot/src/usr.bin/netstat/netstat.h,v
retrieving revision 1.49
diff -u -p -r1.49 netstat.h
--- src/usr.bin/netstat/netstat.h24 Apr 2014 14:54:51 -1.49
+++ src/usr.bin/netstat/netstat.h25 Apr 2014 20:19:28 -
@@ -116,6 +116,8 @@ voidimpstats(u_long, u_long);
 
 voidpr_rthdr(int, int);

 voidpr_family(int);
+struct rt_metrics;
+voidpr_rtrmx(struct rt_metrics *);
 voidrt_stats(u_long);
 char*ns_phost(struct sockaddr *);
 
Index: src/usr.bin/netstat/route.c

===
RCS file: /cvsroot/src/usr.bin/netstat/route.c,v
retrieving revision 1.81
diff -u -p -r1.81 route.c
--- src/usr.bin/netstat/route.c24 Apr 2014 14:56:29 -1.81
+++ src/usr.bin/netstat/route.c25 Apr 2014 20:19:28 -
@@ -286,27 +286,36 @@ p_krtentry(struct rtentry *rt)
 rt-rt_nodes[0].rn_dupedkey ?  = : );
 }
 putchar('\n');
- if (vflag) {
- printf(\texpire   %10PRId64%c  recvpipe %10PRIu64%c  
-   sendpipe %10PRIu64%c\n,
- (int64_t)rt-rt_rmx.rmx_expire,
- (rt-rt_rmx.rmx_locks  RTV_EXPIRE) ? 'L' : ' ',
- rt-rt_rmx.rmx_recvpipe,
- (rt-rt_rmx.rmx_locks  RTV_RPIPE) ? 'L' : ' ',
- rt-rt_rmx.rmx_sendpipe,
- (rt-rt_rmx.rmx_locks  RTV_SPIPE) ? 'L' : ' ');
- printf(\tssthresh %10PRIu64%c  rtt  %10PRIu64%c  
-   rttvar   %10PRIu64%c\n,
- rt-rt_rmx.rmx_ssthresh,
- (rt-rt_rmx.rmx_locks  RTV_SSTHRESH) ? 'L' : ' ',
- rt-rt_rmx.rmx_rtt,
- (rt-rt_rmx.rmx_locks  RTV_RTT) ? 'L' : ' ',
- rt-rt_rmx.rmx_rttvar,
-(rt-rt_rmx.rmx_locks  RTV_RTTVAR) ? 'L' : ' ');
- printf(\thopcount %10PRIu64%c\n,
- rt-rt_rmx.rmx_hopcount,
-(rt-rt_rmx.rmx_locks  RTV_HOPCOUNT) ? 'L' : ' ');
- }
+if (vflag) {
+pr_rtrmx(rt-rt_rmx);
+}
+}
+
+void
+pr_rtrmx(struct rt_metrics *rmx)
+{
+if (rmx == NULL)
+return;
+
+printf(\texpire   %10PRId64%c  recvpipe %10PRIu64%c  
+   sendpipe %10PRIu64%c\n,
+(int64_t)rmx-rmx_expire,
+(rmx-rmx_locks  RTV_EXPIRE) ? 'L' : ' ',
+rmx-rmx_recvpipe,
+(rmx-rmx_locks  RTV_RPIPE) ? 'L' : ' ',
+rmx-rmx_sendpipe,
+(rmx-rmx_locks  RTV_SPIPE) ? 'L' : ' ');
+printf(\tssthresh %10PRIu64%c  rtt  %10PRIu64%c  
+   rttvar   %10PRIu64%c\n,
+rmx-rmx_ssthresh,
+(rmx-rmx_locks  RTV_SSTHRESH) ? 'L' : ' ',
+rmx-rmx_rtt,
+(rmx-rmx_locks  RTV_RTT) ? 'L' : ' ',
+rmx-rmx_rttvar,
+(rmx-rmx_locks  RTV_RTTVAR) ? 'L' : ' ');
+printf(\thopcount %10PRIu64%c\n,
+rmx-rmx_hopcount,
+(rmx-rmx_locks  RTV_HOPCOUNT) ? 'L' : ' ');
 }
 
 /*

Index: src/usr.bin/netstat/show.c
===
RCS file: /cvsroot/src/usr.bin/netstat/show.c,v
retrieving revision 1.18
diff -u -p -r1.18 show.c

Re: CVS commit: src/sys/arch/xen/xenbus

2012-06-10 Thread Takahiro HAYASHI
On Thu, 7 Jun 2012 14:05:14 +
Stephen Borrill sborr...@netbsd.org wrote:

 Module Name:  src
 Committed By: sborrill
 Date: Thu Jun  7 14:05:14 UTC 2012
 
 Modified Files:
   src/sys/arch/xen/xenbus: xenbus_probe.c
 
 Log Message:
 Fix problem where devices with ID 0 were skipped as invalid as it didn't
 distinguish between numerical zero and invalid numeric string.

domU now recognizes interfaces correctly.
(I updated only kernel for domU and checked.)
Thank you for fix.

--
t-hash



Re: CVS commit: src/sys/arch/xen/xenbus

2012-06-06 Thread Takahiro HAYASHI
Hello,

It seems that this change makes the first vif of domU not recognized
when multiple vif's are assigned in config file.

For example, when config has
vif = [ 'mac=mac0, bridge=bridge0',
'mac=mac1, bridge=bridge1',
'mac=mac2, bridge=bridge2 ]

, you can see on domU
xennet0, whose mac is mac1,
xennet1, whose mac is mac2.

I see this problem on i386pae as domU running on amd64 as dom0.

On Tue, 5 Jun 2012 10:58:57 +
Stephen Borrill sborr...@netbsd.org wrote:

 Module Name:  src
 Committed By: sborrill
 Date: Tue Jun  5 10:58:57 UTC 2012
 
 Modified Files:
   src/sys/arch/xen/xenbus: xenbus_probe.c
 
 Log Message:
 Sort vif and vbd device IDs numerically so that attach order does not depend
 on the order they are passed in through xenstore. While this works for
 hand-crafted Xen configuration files, it does not work for XenServer, XCP or
 EC2 instances. This means that adding an extra virtual disk can make the
 domU unbootable.
 
 ID is actually based on the Linux device major/minor so this approach isn't
 entirely correct (for instance, you can specify devices to be non-contiguous
 which doesn't fit too well with our autoconf approach), but it works as a
 first approximation.
 
 Tested by me on XenServer and riz@ on EC2. OK bouyer@
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.35 -r1.36 src/sys/arch/xen/xenbus/xenbus_probe.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

--
t-hash



Re: CVS commit: src/sys/dev/pci

2010-06-27 Thread Takahiro HAYASHI
Hi,

On Sun, 27 Jun 2010 11:14:44 +0200
Tobias Nygren t...@netbsd.org wrote:

 On Fri, 25 Jun 2010 04:03:14 +
 SAITOH Masanobu msai...@netbsd.org wrote:
 
  Modified Files:
  src/sys/dev/pci: if_wm.c if_wmreg.h
  
  Log Message:
  Add some code to support 82580[ER]. Tested on my own I340-T4.
 
 Hi,
 
 My wm0 does not attach anymore.
 
 Kernel from 2010-06-20:
 wm0 at pci3 dev 6 function 0: Intel i82541PI 1000BASE-T Ethernet, rev. 5
 wm0: interrupting at ioapic0 pin 21
 wm0: 32-bit 33MHz PCI bus
 wm0: 64 word (6 address bits) MicroWire EEPROM
 wm0: Ethernet address 00:1b:21:4d:a9:66
 igphy0 at wm0 phy 1: Intel IGP01E1000 Gigabit PHY, rev. 0
 
 Today's kernel:
 wm0 at pci3 dev 6 function 0: Intel i82541PI 1000BASE-T Ethernet, rev. 5
 wm0: interrupting at ioapic0 pin 21 
 wm0: 32-bit 33MHz PCI bus
 wm0: 64 word (6 address bits) MicroWire EEPROM
 
 No error messages(?), but apparently the mac address didn't read out and
 the phy didn't attach.

I see same message with i82540EM (0x100e8086) card.
Should if_wm.c be like this?

Index: sys/dev/pci/if_wm.c
===
RCS file: /cvsroot/src/sys/dev/pci/if_wm.c,v
retrieving revision 1.209
diff -u -u -r1.209 if_wm.c
--- sys/dev/pci/if_wm.c 25 Jun 2010 04:35:54 -  1.209
+++ sys/dev/pci/if_wm.c 27 Jun 2010 13:20:55 -
@@ -1607,10 +1607,11 @@
KASSERT(prop_data_size(ea) == ETHER_ADDR_LEN);
memcpy(enaddr, prop_data_data_nocopy(ea), ETHER_ADDR_LEN);
} else {
-   if (wm_read_mac_addr(sc, enaddr) != 0)
+   if (wm_read_mac_addr(sc, enaddr) != 0) {
aprint_error_dev(sc-sc_dev,
unable to read Ethernet address\n);
-   return;
+   return;
+   }
}
 
aprint_normal_dev(sc-sc_dev, Ethernet address %s\n,


-- 
Takahiro Hayashi h...@abox3.so-net.ne.jp