Re: FreeBSD panic with umass

2003-01-26 Thread MIHIRA Sanpei Yoshiro
I forgot to add below changes.

Please apply this patch and
# make -f Makefile.usbdevs

Cheers

- sanpei


Index: sys/dev/usb/usbdevs
===
RCS file: /home/ncvs/src/sys/dev/usb/usbdevs,v
retrieving revision 1.106
diff -u -r1.106 usbdevs
--- sys/dev/usb/usbdevs 21 Jan 2003 11:37:54 -  1.106
+++ sys/dev/usb/usbdevs 26 Jan 2003 21:48:19 -
@@ -626,6 +626,11 @@
 /* Fuji photo products */
 product FUJIPHOTO MASS0100 0x0100  Mass Storage
 
+/* Genesys Logic products */
+productGENESYS GL650   0x0604  GL650 Hub
+productGENESYS GL641USB0x0700  GL641USB CompactFlash Card Reader
+productGENESYS GL641USB2IDE0x0702  GL641USB USB-IDE Bridge
+
 /* Hagiwara products */
 product HAGIWARA FGSM  0x0002  FlashGate SmartMedia Card Reader
 product HAGIWARA FGCF  0x0003  FlashGate CompactFlash Card Reader

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: FreeBSD panic with umass

2003-01-26 Thread MIHIRA Sanpei Yoshiro
I have GENESYS USB2IDE Interface Card(GL641).  And I also have
same problem(umass0: BBB bulk-in clear stall failed, IOERROR)

NetBSD was aleady fixed 
http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=19971
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/usb/umass_scsipi.c

I created patch for FreeBSD-current. Try this one.

May I commit this changes?

---
MIHIRA, Sanpei Yoshiro
Tokyo, Japan.

Index: sys/dev/usb/umass.c
===
RCS file: /home/ncvs/src/sys/dev/usb/umass.c,v
retrieving revision 1.71
diff -u -r1.71 umass.c
--- sys/dev/usb/umass.c 21 Jan 2003 08:55:44 -  1.71
+++ sys/dev/usb/umass.c 26 Jan 2003 17:54:45 -
@@ -373,6 +373,16 @@
  UMASS_PROTO_ATAPI | UMASS_PROTO_CBI_I,
  FORCE_SHORT_INQUIRY
},
+   /* sanpei */
+   { USB_VENDOR_GENESYS,  0x0702 /* GENESYS_GL641USB2 */, RID_WILDCARD,
+ UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
+ FORCE_SHORT_INQUIRY | NO_START_STOP | IGNORE_RESIDUE 
+   },
+   /* sanpei */
+   { USB_VENDOR_GENESYS,  GL641USB, RID_WILDCARD,
+ UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
+ FORCE_SHORT_INQUIRY | NO_START_STOP | IGNORE_RESIDUE 
+   },
 
{ VID_EOT, PID_EOT, RID_EOT, 0, 0 }
 };
@@ -2367,6 +2377,11 @@
 */
 
if (sc->transform(sc, cmd, cmdlen, &rcmd, &rcmdlen)) {
+#if 1 /* XXX sanpei */
+   if ((sc->quirks & FORCE_SHORT_INQUIRY) && (rcmd[0] == 
+INQUIRY)) {
+   csio->dxfer_len = SHORT_INQUIRY_LENGTH;
+   }
+#endif
sc->transfer(sc, ccb->ccb_h.target_lun, rcmd, rcmdlen,
 csio->data_ptr,
 csio->dxfer_len, dir,
@@ -2559,6 +2574,11 @@
(unsigned char *) &sc->cam_scsi_sense,
sizeof(sc->cam_scsi_sense),
        &rcmd, &rcmdlen)) {
+#if 1 /* XXX sanpei */
+   if ((sc->quirks & FORCE_SHORT_INQUIRY) && (rcmd[0] == 
+INQUIRY)) {
+   csio->sense_len = SHORT_INQUIRY_LENGTH;
+   }
+#endif
sc->transfer(sc, ccb->ccb_h.target_lun,
 rcmd, rcmdlen,
 &csio->sense_data,
@@ -2750,6 +2770,18 @@
    return 1;
}
/* fallthrough */
+#if 1 /* XXX sanpei */
+   case INQUIRY:
+   /* some drives wedge when asked for full inquiry information. */
+   if (sc->quirks & FORCE_SHORT_INQUIRY) {
+   memset(*rcmd, 0, cmdlen);
+   memcpy(*rcmd, cmd, cmdlen);
+   *rcmdlen = cmdlen;
+   (*rcmd)[4] = SHORT_INQUIRY_LENGTH;
+   return 1;
+   }
+   /* fallthrough */
+#endif
default:
*rcmd = cmd;/* We don't need to copy it */
*rcmdlen = cmdlen;

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



use md device in /etc/rc.diskless{1,2}

2001-03-25 Thread MIHIRA Sanpei Yoshiro

Hi.

  I have diskless-PC which was used /boot/pxeboot.  But latest
FreeBSD-current is output below messages and some fsck_nfs problem.

WARNING: MFS is being phased out in preference for md devices
WARNING: Please see mdconfig(8) for details
WARNING: Continuing in 15 seconds

  Does someone already rewrite and use mdconfig in /etc/rc.diskless1
and diskless2?

Cheers.
---
MIHIRA, Sanpei Yoshiro
Yokohama, Japan.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: new pccard beep code "not quite right"

2000-10-30 Thread sanpei

[EMAIL PROTECTED] wrote:

>> While I'm sure the new beeps for pccard insert/remove are quite charming
>> on some laptops, they are a bit broken on mine...
>> 
>> The new beeps are nothing more than a barely audible click or two... But
>> the real problem is that if the speaker wants to beep afterwards, my ears
>> are assaulted by not one but a nearly endless stream of beeps. They
>> continue for different lengths depending on when they begin... They seem
>> to stop when a card is identified though -- but it only requires another
>> beep to set it off again, and they continue until a card is either ejected
>> or another is identified (they don't stop if I break to ddb).
>> 
>> Any debugging info needed will be happily provided!

This is my fault. I fixed this problem in sys/pccard/pccard_beep.c
rev.1.5.  Please update your kernel.

Cheers
MIHIRA Yoshiro


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Please review: PC-Card melody beep code.

2000-10-22 Thread MIHIRA Sanpei Yoshiro

Hi.
FreeBSD developers.

  This is PC-Card melody beep code for
5-current(/sys/pccard/pccard_beep.c) from PAO3.  This patch does not
need to change sys/i386/isa/clock.c.

Any problems, please let me know.
---
MIHIRA, Sanpei Yoshiro
Yokohama, Japan.

Index: src/sys/pccard/driver.h
===
RCS file: /home/ncvs/src/sys/pccard/driver.h,v
retrieving revision 1.12
diff -u -r1.12 driver.h
--- src/sys/pccard/driver.h 1999/12/02 19:46:40 1.12
+++ src/sys/pccard/driver.h 2000/10/22 14:25:34
@@ -19,6 +19,6 @@
 void   pccard_remove_beep __P((void));
 void   pccard_success_beep __P((void));
 void   pccard_failure_beep __P((void));
-intpccard_beep_select __P((enum beepstate));
+intpccard_beep_select __P((int));
 
 #endif /* !_PCCARD_DRIVER_H_ */
Index: src/sys/pccard/pccard_beep.c
===
RCS file: /home/ncvs/src/sys/pccard/pccard_beep.c,v
retrieving revision 1.3
diff -u -r1.3 pccard_beep.c
--- src/sys/pccard/pccard_beep.c1999/12/02 19:46:41 1.3
+++ src/sys/pccard/pccard_beep.c2000/10/22 14:25:34
@@ -13,67 +13,118 @@
 
 #include 
 
-#definePCCARD_BEEP_PITCH0  1600
-#definePCCARD_BEEP_DURATION0   20
-#definePCCARD_BEEP_PITCH1  1200
-#definePCCARD_BEEP_DURATION1   40
-#definePCCARD_BEEP_PITCH2  3200
-#definePCCARD_BEEP_DURATION2   40
-
-static struct callout_handle beeptimeout_ch
-= CALLOUT_HANDLE_INITIALIZER(&beeptimeout_ch);
-
 static enum beepstate allow_beep = BEEP_OFF;
+static int melody_type = 0;
 
-/*
- * timeout function to keep lots of noise from
- * happening with insertion/removals.
- */
-static void enable_beep(void *dummy)
-{
-   /* Should never be needed */
-   untimeout(enable_beep, (void *)NULL, beeptimeout_ch);
+#define MAX_TONE_MODE  3
+#define MAX_STATE  4 
 
-   allow_beep = BEEP_ON;
+struct tone {
+int duration;
+int pitch;
+};
+
+
+static struct tone silent_beep[] = {
+   {NULL, NULL}
+};
+
+static struct tone success_beep[] = {
+   {1200,   40}, {NULL, NULL}
+};
+static struct tone failure_beep[] = {
+   {3200,   40}, {NULL, NULL}
+};
+static struct tone insert_remove_beep[] = {
+   {1600,   20}, {NULL, NULL}
+};
+
+static struct tone success_melody_beep[] = {
+   {1200,7}, {1000,7}, { 800,   15}, {NULL, NULL}
+};
+static struct tone failure_melody_beep[] = {
+   {2000,7}, {2400,7}, {2800,   15}, {NULL, NULL}
+};
+static struct tone insert_melody_beep[] = {
+   {1600,   10}, {1200,5}, {NULL, NULL}
+};
+static struct tone remove_melody_beep[] = {
+   {1200,   10}, {1600,5}, {NULL, NULL}
+};
+
+static struct tone *melody_table[MAX_TONE_MODE][MAX_STATE] = {
+   { /* silent mode */
+   silent_beep, silent_beep, silent_beep, silent_beep,
+   },
+   { /* simple beep mode */
+   success_beep, failure_beep,
+   insert_remove_beep, insert_remove_beep,
+   },
+   { /* melody beep mode */
+   success_melody_beep, failure_melody_beep,
+   insert_melody_beep, remove_melody_beep,
+   },
+};
+
+
+static void
+pccard_beep_sub(void *arg)
+{
+   struct tone *melody;
+   melody = (struct tone *)arg;
+
+   if (melody->duration != NULL) {
+   sysbeep(melody->duration, melody->pitch);
+   timeout(pccard_beep_sub, ++melody, melody->pitch);
+   } else 
+   allow_beep = BEEP_ON;
 }
 
-void pccard_insert_beep(void)
+static void
+pccard_beep_start(void *arg)
 {
-   if (allow_beep == BEEP_ON) {
-   sysbeep(PCCARD_BEEP_PITCH0, PCCARD_BEEP_DURATION0);
-   allow_beep = BEEP_OFF;
-   beeptimeout_ch = timeout(enable_beep, (void *)NULL, hz / 5);
-   }
-}
+   struct tone *melody;
+   melody = (struct tone *)arg;
 
-void pccard_remove_beep(void)
-{
-   if (allow_beep == BEEP_ON) {
-   sysbeep(PCCARD_BEEP_PITCH0, PCCARD_BEEP_DURATION0);
+   if (allow_beep == BEEP_ON && melody->duration != NULL) {
allow_beep = BEEP_OFF;
-   beeptimeout_ch = timeout(enable_beep, (void *)NULL, hz / 5);
+   sysbeep(melody->duration, melody->pitch);
+   timeout(pccard_beep_sub, ++melody, melody->pitch);
}
 }
 
 void pccard_success_beep(void)
 {
-   if (allow_beep == BEEP_ON) {
-   sysbeep(PCCARD_BEEP_PITCH1, PCCARD_BEEP_DURATION1);
-   }
+   pccard_beep_start(melody_table[melody_type][0]);
 }
 
 void pccard_failure_beep(void)
 {
-   if (allow_beep == BEEP_ON) {
-   sysbeep(PCCARD_BEEP_PITCH2, PCCARD_BEEP_DURATION2);
-   }
+   pccard_beep_start(melody_table[melody_type][1]);
 }
 
-int pccard_beep_select(enum beepstate state)
+void pccard_insert_beep(void)
+{
+   pccard_beep_start(melod

[Patch] card_irq was confused in release/sysinstall/pccard.c

2000-10-10 Thread MIHIRA Sanpei Yoshiro

  I found card_irq was confused in release/sysinstall/pccard.
  In Some code, card_irq was used in global variable(variable_set2),
and in others, char pointer and never set -i option for pccardd
in installation time.

   139  char *card_irq = "";<--- char *

   190  /* get card_irq out of CardIrq somehow */
   191  if (CardIrq) {
   192  for (i = 0; i < IRQ_COUNT; i++) {
   193  if ((CardIrq & IrqTable[i].my_bit) != 0) {
   194  sprintf(temp, "%s %s", card_irq, IrqTable[i].my_flag);
    char *
   195  variable_set2("card_irq", temp, 1); <-- global!!
   196  }
   197  }
   198  }

   237  strcat(pccardd_cmd, card_irq);  <-- char *
   240  variable_set2("pccardd_flags", card_irq, 1);<-- char *

  I think we need to fix like this. 
---
MIHIRA, Sanpei Yoshiro
Yokohama, Japan.


--- release/sysinstall/pccard.c.org Tue Oct 10 12:35:09 2000
+++ release/sysinstall/pccard.c Tue Oct 10 12:36:24 2000
@@ -136,7 +136,7 @@
 intpcic_mem = 0xd;
 int beep_newstat;
 char card_device[16];
-char *card_irq = "";
+char card_irq[256] = "";
 char temp[256];
 char *spcic_mem;
 char pccardd_cmd[256];
@@ -192,7 +192,7 @@
 for (i = 0; i < IRQ_COUNT; i++) {
 if ((CardIrq & IrqTable[i].my_bit) != 0) {
 sprintf(temp, "%s %s", card_irq, IrqTable[i].my_flag);
-variable_set2("card_irq", temp, 1);
+strcpy(card_irq, temp);
 }
 } 
 }





To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Please review: small change in sys/i386/isa/clock.c andsys/alpha/alpha/clock.c for PC-Card melody beep code.

2000-09-22 Thread sanpei

Bruce Evans <[EMAIL PROTECTED]> wrote:
>On Sun, 17 Sep 2000, Warner Losh wrote:
>
>> I've seen these patches many times and think that it is a good idea.
>> This interface needs to be exported so that the pccard system sounds
>> don't interfere with normal systme sounds.
>
>It needs locking changes to be exportable:
>
>1) splhigh()/splx(), at least in RELENG_4 where there is no giant lock
>   and spl*() has a non-null effect, so that callers don't need to know
>   that it must be called at splsoftclock() or higher.
>2) Honor the current locking protocol acquire_timer2()/release_timer2()
>   -- don't do anything if (!beeping).

  Hum, is below code which was from PAO3 good for FreeBSD tree?

# But I think it has still has 1) problem... Do you have any
# idea about this melody patch...

Cheers.
---
MIHIRA, Sanpei Yoshiro
Yokohama, Japan.


--- sys/i386/isa/clock.c.orgMon Jan  3 10:46:36 2000
+++ sys/i386/isa/clock.cMon Jan  3 10:47:52 2000
@@ -188,6 +188,9 @@
 SYSCTL_OPAQUE(_debug, OID_AUTO, tsc_timecounter, CTLFLAG_RD, 
&tsc_timecounter, sizeof(tsc_timecounter), "S,timecounter", "");
 
+static struct callout_handle sysbeep_ch
+   = CALLOUT_HANDLE_INITIALIZER(&sysbeep_ch);
+
 static struct timecounter i8254_timecounter = {
i8254_get_timecount,/* get_timecount */
0,  /* no poll_pps */
@@ -536,10 +539,21 @@
/* enable counter2 output to speaker */
outb(IO_PPI, inb(IO_PPI) | 3);
beeping = period;
-   timeout(sysbeepstop, (void *)NULL, period);
+   sysbeep_ch = timeout(sysbeepstop, (void *)NULL, period);
}
splx(x);
return (0);
+}
+
+int
+sysbeep_cancel(void)
+{
+   if (beeping) {
+   untimeout(sysbeepstop, (void *)NULL, sysbeep_ch);
+   sysbeepstop((void *)NULL);
+   return 0;
+   }
+   return -1;
 }
 
 /*
--- sys/i386/include/clock.h.orgMon Jan  3 10:58:30 2000
+++ sys/i386/include/clock.hMon Jan  3 10:59:13 2000
@@ -44,6 +44,7 @@
 intrelease_timer1 __P((void));
 #endif
 intsysbeep __P((int pitch, int period));
+intsysbeep_cancel __P((void));
 void   i8254_restore __P((void));
 
 #endif /* _KERNEL */


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Please review: small change in sys/i386/isa/clock.c and sys/alpha/alpha/clock.c for PC-Card melody beep code.

2000-09-18 Thread sanpei

Warner-san wrote:
>In message <[EMAIL PROTECTED]> [EMAIL PROTECTED] writes:
>: >I've seen these patches many times and think that it is a good idea.
>: >This interface needs to be exported so that the pccard system sounds
>: >don't interfere with normal systme sounds.
>: 
>:   Thanks for your response.  OK, I will commit this patch the next
>: weekend.
>: --
>:   By the way, we also need to change in sys/pc98/pc98/clock.c.
>
>mihira-san,
>   Did you see bruce's commentso n the change?

  I wrote replay mail before I read Bruce's mail

  I will re-write code with bruce's suggestion.

Thank you, Bruce and Warner.
---
MIHIRA, Sanpei Yoshiro
Yokohama, Japan.



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Please review: small change in sys/i386/isa/clock.c and sys/alpha/alpha/clock.c for PC-Card melody beep code.

2000-09-18 Thread sanpei

>I've seen these patches many times and think that it is a good idea.
>This interface needs to be exported so that the pccard system sounds
>don't interfere with normal systme sounds.

  Thanks for your response.  OK, I will commit this patch the next
weekend.
--
  By the way, we also need to change in sys/pc98/pc98/clock.c.

---
MIHIRA, Sanpei Yoshiro
Yokohama, Japan.

--- sys/pc98/pc98/clock.c.org   Mon Sep 18 21:13:55 2000
+++ sys/pc98/pc98/clock.c   Fri Sep 15 14:42:42 2000
@@ -583,7 +583,7 @@
 #endif
 }
 
-void
+static void
 sysbeepstop(void *chan)
 {
 #ifdef PC98/* PC98 */


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Please review: small change in sys/i386/isa/clock.c and sys/alpha/alpha/clock.c for PC-Card melody beep code.

2000-09-17 Thread sanpei

Hi.
FreeBSD developers.

  I have a plan to commit PC-Card melody beep code into
5-current(/sys/pccard/pccard_beep.c) from PAO3.  But it needs to
call sysbeepstop@sys/${ARCH}/${BUS}/clock.c function from
pccard_beep.c.

  May I commit below small changes to sys/i386/isa/clock.c and
sys/alpha/alpha/clock.c?

MAIN POINT:
static void sysbeepstop --> void sysbeepstop.

Full PC-Card melody patch is in below URL.
http://people.FreeBSD.org/~sanpei/5-current/sys-pccard-pccard_beep_melody-2917.diff

---
MIHIRA, Sanpei Yoshiro
Yokohama, Japan.

--- sys/i386/isa/clock.c.orgTue May  9 10:16:31 2000
+++ sys/i386/isa/clock.cSat May  6 00:50:11 2000
@@ -510,7 +510,7 @@
 #endif
 }
 
-static void
+void
 sysbeepstop(void *chan)
 {
outb(IO_PPI, inb(IO_PPI)&0xFC); /* disable counter2 output to speaker */
--- sys/alpha/alpha/clock.c.org Fri Sep 15 18:05:23 2000
+++ sys/alpha/alpha/clock.c Fri Sep 15 18:05:52 2000
@@ -626,7 +626,7 @@
return (0);
 }
 
-static void
+void
 sysbeepstop(void *chan)
 {
outb(IO_PPI, inb(IO_PPI)&0xFC); /* disable counter2 output to speaker */
--- sys/i386/include/clock.h.orgFri Sep 15 18:07:58 2000
+++ sys/i386/include/clock.hFri Sep 15 18:09:19 2000
@@ -44,6 +44,7 @@
 intrelease_timer1 __P((void));
 #endif
 intsysbeep __P((int pitch, int period));
+void   sysbeepstop __P((void *chan));
 void   i8254_restore __P((void));
 
 #endif /* _KERNEL */
--- sys/alpha/include/clock.h.org   Mon Sep 18 00:38:54 2000
+++ sys/alpha/include/clock.h   Mon Sep 18 00:39:12 2000
@@ -17,6 +17,7 @@
 
 void   DELAY __P((int usec));
 intsysbeep __P((int pitch, int period));
+void   sysbeepstop __P((void *chan));
 intacquire_timer2 __P((int mode));
 intrelease_timer2 __P((void));
 



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



[Problem] ata disk driver panic at boot time

2000-08-10 Thread MIHIRA Sanpei Yoshiro

Hi.

  With latest 5-current kernel, it will always panic. 

  My HDD does not support DMA mode.  So with old kernel(maybe before
sos's latest ata changes), it fallback to PIO mode(see attached
text).

  Do only I have this problem?

Thank you.
---
MIHIRA, Sanpei Yoshiro
Yokohama, Japan.


= latest 5-current 
atapci0:  port 0xfcf0-0xfcff at device 20.0 on pci0ata0: 
at 0x1f0 irq 14 on atapci0
<>
ad0: 4645MB  [10068/15/63] at ata0-master using WDMA2
Mounting root from ufs:/dev/ad0s3c
ad0: READ command timeout - resetting
ata0: resetting devices ..

Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0x70
fault code  = supervisor read, page not present
instruction pointer = 0x8:0xc01631a4
stack pointer   = 0x10:0xc02b4e1c
frame pointer   = 0x10:0xc02b4e40
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = Idle
interrupt mask  = net tty bio cam
trap number = 12
panic: page fault

syncing disks...
==

= old 5-current kernel ===
ad0: 4645MB  [10068/15/63] at ata0-master using WDMA2
Mounting root from ufs:/dev/ad0s3c
pccard: card inserted, slot 0
ad0: READ command timeout - resetting
ata0: resetting devices .. done
ad0: READ command timeout - resetting
ata0: resetting devices .. done
ad0: READ command timeout - resetting
ata0: resetting devices .. done
ad0: READ command timeout - resetting
ata0-master: WARNING: WAIT_READY active=ATA_ACTIVE_ATA
ad0: trying fallback to PIO mode
ata0: resetting devices .. done
==


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: [usb-bsd] Re: patches for USB

2000-02-03 Thread MIHIRA Sanpei Yoshiro

>Keep me posted on whether the small patch works as well. In that case I
>will submit it.

  I tested Nick's USB suspend/resume *small* patch with
latest-current.  It's OK for my USB mouse. Thank you.

MIHIRA Yoshiro


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: [usb-bsd] patches for USB

2000-02-02 Thread MIHIRA Sanpei Yoshiro

>When committing the patch to get suspend to work I managed to forget to
>commit the parts for pci/[ou]hci_pci.c. The patch is given below. It
>should make your devices suspend.

  I tested Nick's big-patchset.

http://www.etla.net/~n_hibma/usb/USB-patch-CURRENT

  Without this patch, I can't re-use USB mouse after suspend/resume.
  With this patch, now I can use USB mouse without problem. Thank
you, Nick.

  I hope to fix this problem before FreeBSD-4-RELEASE. May I test
small patch for pci/[ou]hci_pci.c which is posted at this mailing
list.

Thank you.
---
MIHIRA Sanpei Yoshiro
Yokohama, Japan.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: [diskless] /etc/rc.diskless1 in 3-stable is better than in 4-current

2000-01-04 Thread MIHIRA Sanpei Yoshiro

Hi.

  First of all, I tried to take in modification of 3-stable into
4-current. And I tested with 4-current NFS server and diskless
client.

  merge from latest 3-stable rc.diskless shell scripts:
etc/rc.diskless1 1.1.2.1(for 3-stable)
etc/rc.diskless2 1.2.2.1(for 3-stable)

  Some differences between 3-stable and below rc.diskless{1,2} files
- add $FreeBSD$ tag
- apply a consistent style to most of the etc scripts
- don't extract inet6 address for bootp_ipa and bootp_bca.
  
  TODO list:
- If files in ``/etc'' directory are symbolic linked,
  cp -Rp are failed.  I will check it and fix.
- I want to free rc.diskless1 from /usr partition.
  (We don't have any hint about path name of /usr directory
  with bootp.
  But we need to use ``/usr/bin/awk and /usr/bin/fgrep,
  /usr/bin/head'' commands to obtain IP address.
  So currently rc.diskless1 has hard-coded with ${nfs_root}/usr).
- create or copy below files and directories
  (I want to compile ports collection in diskless machine)
/var/db/port.mkversion
    /var/db/pkg

---
MIHIRA Sanpei Yoshiro
Yokohama, Japan.


# $FreeBSD: src/etc/rc.diskless1,v 1.4 1999/09/13 17:09:07 peter Exp $
#
# /etc/rc.diskless - general BOOTP startup
#
#   BOOTP has mounted / for us.  Assume a read-only mount.  We must then
#   - figure out where the NFS mount is coming from
#   - figure out our IP by querying the interface
#   - retarget /conf/ME softlink to proper configuration script directory
#
#   It is expected that /etc/fstab and /etc/rc.conf.local will be
#   set by the system operator on the server to be softlinks to
#   /conf/ME/fstab and /conf/ME/rc.conf.local.  The system operator may
#   choose to retarget other files as well.  The server itself boots
#   properly with its default /conf/ME softlink pointing to
#   /conf/server.host.name.
#
#   During a diskless boot, we retarget the /conf/ME softlink to point
#   to /conf/DISKLESS.CLIENT.IP.ADDRESS.  Thus, various system config
#   files that are softlinks through /conf/ME also get retargeted.
#
# SEE SAMPLE FILES IN /usr/share/examples/diskless.

# chkerr:
#
# Routine to check for error
#
#   checks error code and drops into shell on failure.
#   if shell exits, terminates script as well as /etc/rc.
#
chkerr() {
case $1 in
0)
;;
*)
echo "$2 failed: dropping into /bin/sh"
/bin/sh
# RESUME
;;
esac
}

# DEBUGGING
#
# set -v

# Figure out where the root mount is coming from, synthesize a mount
# for /usr and mount it.
#
# e.g. nfs_root might wind up as "A.B.C.D:/"
#
# NOTE! the /usr mount is only temporary so we can access commands necessary
# to retarget /conf/ME.  The actual /usr mount should be part of the
# retargeted /etc/fstab.  See instructions in /usr/share/examples/diskless.
#
set `/bin/df /`
nfs_root=$8

# XXX we should extract the host part from nfs_root, but we don't have
# any good tool for string parsing yet. The ../ is a dirty hack. We
# can add more than one. But this whole section to determine the boot
# ifc etc. needs some cleanup
mount_nfs -o ro ${nfs_root}/../usr /usr

chkerr $? "mount of /usr"

# Figure out our interface and IP.
#

bootp_ifc=`route -n get default | fgrep interface | awk '{ print $2; }'`
bootp_ipbca=`ifconfig ${bootp_ifc} | fgrep 'inet ' | head -1 | awk '{ print $6; }'`
bootp_ipa=`ifconfig ${bootp_ifc} | fgrep 'inet ' | head -1 | awk '{ print $2; }'`

echo "Interface ${bootp_ifc} IP-Address ${bootp_ipa} Broadcast ${bootp_ipbca}"

umount /usr
 
# Files in /etc are copied to /conf/etc which is writable. Then
# per-machine configs from /conf/ip.address/etc are copied onto this
# directory. First choice is using the client's IP, then the client's
# broadcast address, then a default configuration.
# This way we have some flexibility to handle clusters of machines
# on separate subnets.
#
# WARNING! null mounts cannot handle mmap, and since many programs
# use mmap (such as 'cp'), we have to copy.
#
mount_mfs -s 2048 -T qp120at dummy /conf/etc
cp -Rp /etc/* /conf/etc
chkerr $? "MFS mount on /conf/etc"

if [ -d /conf/${bootp_ipa} ]
then
cp -Rp /conf/${bootp_ipa}/etc/* /conf/etc
elif [ -d /conf/${bootp_ipbca} ]
then
cp -Rp /conf/${bootp_ipbca}/etc/* /conf/etc
else
cp -Rp /conf/default/etc/* /conf/etc
fi


#mkdir /conf/ME
#cp -Rp /conf/${bootp_ipa}/* /conf/ME
#
# Make the new directory available as /etc
#
mount_null /conf/etc /etc

# retarget the kernel
#

#sysctl -w kern.bootfile=/conf/ME/kernel

# Tell /etc/rc to run the specified script after
# it does its mounts but before it does anything
# else

kernel panic with newpcm/CS4236 (IBM ThinkPAD600)

2000-01-03 Thread MIHIRA Sanpei Yoshiro

Hi.

  I'm playing latest 4-current/newpcm sound driver with IBM ThinkPad
600/CS4236.

  It was probed like this:

pcm0:  at port 0x52c-0x533 irq 5 drq 1 flags 0xa110 on isa0
bus_dmamap_load: Too many segs! buf_len = 0xdf00
bus_dmamap_load: Too many segs! buf_len = 0xdf00

  But if I playback audio file like this, always no sound and
paniced with latest driver

% cat test.au > /dev/audio
panic: isa_dmastart: bad nounce buffer  < kernel message
<<< kernel panic >>>

kernel configuration was as belwo:
device pcm0 at isa? port 0x52C irq 5 drq 1 flags 0x10

  I think at middle of 1999/Dec, I could play with this sound card
and sound driver.

MIHIRA Yoshiro
Yokohama, Japan.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



[thread,xmovie] I ported, but missed xmovie (QuickTime Movie Player) to FreeBSD-4-current From Linux.

1999-12-21 Thread MIHIRA Sanpei Yoshiro

Hi.

  Now we have pthread_cancel in FreeBSD-current(Thanks alfred).

  So I ported xmovie (QuickTime Movie Player). It use pthread_cancel
function.  But It can't play correctly.

  Sorry, I don't have enough skill and time to solve this problem.
I hope to someone help this problem.

  Current status:
- It can be compiled without error under 4-current.
  But this source directory call XShmGetEventBase
  which is defined internal function in XFree86/libXext.
  So I quick hacked and comment out in bcbase/bcbitmap.C.
  (patches/patch-ad)

- But it has pthread_mutex problem. I can't play
  QuickTime Movie.

- If I create linux native binary in Linux
  and execute it under Linux-emulator in FreeBSD,
  I can play with it.

  I attached ports style file with shar.

Thank you.
MIHIRA Yoshiro

--
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#   xmovie/Makefile
#   xmovie/files/md5
#   xmovie/patches/patch-aa
#   xmovie/patches/patch-ab
#   xmovie/patches/patch-ac
#   xmovie/patches/patch-ad
#   xmovie/patches/patch-ae
#   xmovie/patches/patch-af
#   xmovie/patches/patch-ag
#
echo x - xmovie/Makefile
sed 's/^X//' >xmovie/Makefile << 'END-of-xmovie/Makefile'
X# New ports collection makefile for:   xmovie
X# Version required:1.1.1
X# Date created:20 December 1998
X# Whom:MIHIRA Sanpei Yoshiro <[EMAIL PROTECTED]>
X#
X# $FreeBSD$
X#
X
XDISTNAME=  xmovie-1.1.1
XCATEGORIES=graphics
XMASTER_SITES=  http://heroine.linuxbox.com/
X
XMAINTAINER=[EMAIL PROTECTED]
X
XLIB_DEPENDS=   jpeg.9:${PORTSDIR}/graphics/jpeg \
X   png.3:${PORTSDIR}/graphics/png \
X   X11.6:${PORTSDIR}/x11/XFree86
X
XUSE_GMAKE= yes
XWRKSRC=${WRKDIR}/xmovie
X
X.include 
END-of-xmovie/Makefile
echo x - xmovie/files/md5
sed 's/^X//' >xmovie/files/md5 << 'END-of-xmovie/files/md5'
XMD5 (xmovie-1.1.1.tar.gz) = 598f61447506ece84e16aa129d82b0ef
END-of-xmovie/files/md5
echo x - xmovie/patches/patch-aa
sed 's/^X//' >xmovie/patches/patch-aa << 'END-of-xmovie/patches/patch-aa'
X--- Makefile.org   Thu Nov 25 10:34:27 1999
X+++ Makefile   Thu Nov 25 10:35:15 1999
X@@ -1,18 +1,18 @@
X include global_config
X 
X all:
X-  make -C quicktime4linux
X-  make -C bcbase
X-  make -C src
X+  gmake -C quicktime4linux
X+  gmake -C bcbase
X+  gmake -C src
X 
X dist:
X-  make -C quicktime4linux clean
X-  make -C bcbase clean && \
X-  make -C src clean && \
X+  gmake -C quicktime4linux clean
X+  gmake -C bcbase clean && \
X+  gmake -C src clean && \
X   cd .. && \
X   tar ch $(INSTDIR) | gzip -9 > $(TARBALL)
X 
X clean:
X-  make -C quicktime4linux clean
X-  make -C bcbase clean
X-  make -C src clean;
X+  gmake -C quicktime4linux clean
X+  gmake -C bcbase clean
X+  gmake -C src clean;
END-of-xmovie/patches/patch-aa
echo x - xmovie/patches/patch-ab
sed 's/^X//' >xmovie/patches/patch-ab << 'END-of-xmovie/patches/patch-ab'
X--- global_config.org  Mon Dec 20 17:06:25 1999
X+++ global_config  Mon Dec 20 17:13:32 1999
X@@ -3,6 +3,7 @@
X CC = g++
X XMOVIELIBS = ../quicktime4linux/libquicktime.a ../bcbase/libbcbase.a -ljpeg -lpng -lz
X XMOVIECFLAGS = $(CFLAGS) -I../bcbase -I../quicktime4linux/
X-XLIBS = -lX11 -lXext -lpthread -lm
X-LFLAGS = -L../bcbase -L/usr/X11R6/lib
X+XLIBS = -lX11 -lXext -pthread -lm
X+LFLAGS = -L../bcbase -L/usr/X11R6/lib -L/usr/local/lib
X LDLINKER = g++ -shared 
X+CFLAGS += -I/usr/X11R6/include -I/usr/local/include/
END-of-xmovie/patches/patch-ab
echo x - xmovie/patches/patch-ac
sed 's/^X//' >xmovie/patches/patch-ac << 'END-of-xmovie/patches/patch-ac'
X--- bcbase/thread.C.orgWed Aug  4 10:49:09 1999
X+++ bcbase/thread.CThu Nov 25 11:21:26 1999
X@@ -3,6 +3,7 @@
X #include 
X #include 
X #include "thread.h"
X+#include 
X 
X 
X Thread::Thread(int synchronous, int realtime)
END-of-xmovie/patches/patch-ac
echo x - xmovie/patches/patch-ad
sed 's/^X//' >xmovie/patches/patch-ad << 'END-of-xmovie/patches/patch-ad'
X--- quicktime4linux/Makefile.org   Thu Oct 21 07:27:41 1999
X+++ quicktime4linux/Makefile   Thu Nov 25 11:20:00 1999
X@@ -64,7 +64,7 @@
X   $(CC) -o dump dump.o $(OUTPUT) -ljpeg -lpng -lz -lpthread
X 
X make_streamable: make_streamable.o $(OUTPUT)
X-  $(CC) -o make_streamable make_streamable.o $(OUTPUT) -ljpeg -lpng -lz -lpthread
X+  $(CC) -o make_streamable 

Re: [diskless] /etc/rc.diskless1 in 3-stable is better than in 4-current

1999-12-21 Thread MIHIRA Sanpei Yoshiro

>i suggest that you try and find a committer which can do appropriate
>tests.

  Huum, at first, I will merge 3-stable rc.diskless1 into 4-current.
And I will test and post patch here.

>BTW -- i attach to this msg a small script (/etc/diskless/clone_root,
>whatever it should go e.g. /usr/share/example/diskless/) that i
>routinely use to create/populate a shared readonly diskless root.
>This ought to be committed at some point,maybe with appropriate cleanup.

  Huum, I also check up it. Thanks for your information.

MIHIRA Yoshiro
Yokohama, Japan.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



[diskless] /etc/rc.diskless1 in 3-stable is better than in 4-current

1999-12-21 Thread MIHIRA Sanpei Yoshiro


[/etc/rc.diskless1 was broken]

  I setup File server under 4-current for diskless machine,
``/etc/rc.diskless1'' for diskless machine was different from
3-stable and broken .

  If I replace rc.diskless1 to 3-stable version, it is fine and
no-trouble under 4-current diskless client.

  From CVS log of src/etc/rc.diskless1, I think someone forgot to
commit newer and sophisticated code in 4-current and only committed
in 3-stable by Luigi.

  I think we need to update 4-current:src/etc/rc.diskless1.
  May I create patch for rc.diskless1?

Thank you
---
MIHIRA Sanpei Yoshiro
Yokohama, Japan.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: ESS1879, pnp_id patch and illegal probe about ESS1888

1999-11-30 Thread MIHIRA Sanpei Yoshiro

>>   But kernel probed ESS1888 as pcm0 and ESS1879 as pcm1.  I think
>> this NOTE-PC only has ESS1879 sound chip and I only use pcm1.  I
>> don't want to probe ESS1888.  How can I solve below problem?
>
>In retrospect, the es1888 probe code I added for alphas was a mistake. I
>will disable that code and work on a better solution for alphas.

  Thanks. ESS1879 can probe as pcm0 sound driver and don't probe
ES1888(ess?) anymore in my NOTE-PC.

  But does someone add pnpid of my sound card to dev/sound/isa/sb.c.
  or do I need to send-pr this patch ?

---
MIHIRA Sanpei Yoshiro
Yokohama, Japan.

--- dev/sound/isa/sb.c.org  Sat Nov 27 23:29:44 1999
+++ dev/sound/isa/sb.c  Sat Nov 27 23:29:57 1999
@@ -1277,6 +1277,10 @@
s = "ESS1869";
break;
 
+   case 0x79187316: /* ESS1879 */
+   s = "ESS1879";
+   break;
+
case 0x88187316: /* ESS1888 */
s = "ESS1888";
break;



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



ESS1879, pnp_id patch and illegal probe about ESS1888

1999-11-27 Thread MIHIRA Sanpei Yoshiro

  I play 4-current with MITSUBISHI AmityCN(NOTE-PC) which has
ESS1879(ISA-PnP) Sound Chip.

  I hope to added below patch to 4-current sound driver.

--
  By the way I added only below line to kernel configuration file.

device pcm0

  But kernel probed ESS1888 as pcm0 and ESS1879 as pcm1.  I think
this NOTE-PC only has ESS1879 sound chip and I only use pcm1.  I
don't want to probe ESS1888.  How can I solve below problem?

>From kernel message
pcm0:  at port 0x220-0x22f irq 5 drq 1 on isa0
device_probe_and_attach: pcm0 attach returned 6
unknown0:  at port 0x800-0x807 on isa0
pcm1:  at port 0x220-0x22f,0x388-0x38b,0x330-0x331 irq 5 drq 1,0 on isa0
isa_dma_acquire: channel 1 already in use
unknown1:  at port 0x201 on isa0
--
---
MIHIRA Sanpei Yoshiro
Yokohama, Japan.


--- dev/sound/isa/sb.c.org  Sat Nov 27 23:29:44 1999
+++ dev/sound/isa/sb.c  Sat Nov 27 23:29:57 1999
@@ -1277,6 +1277,10 @@
s = "ESS1869";
break;
 
+   case 0x79187316: /* ESS1879 */
+   s = "ESS1879";
+   break;
+
case 0x88187316: /* ESS1888 */
s = "ESS1888";
break;


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



PC-Card ejection(suspend) with 4-current

1999-11-10 Thread MIHIRA Sanpei Yoshiro

Warner Losh <[EMAIL PROTECTED]> wrote:
>Card ejection (including suspend) doesn't work, which I'll try to fix
>at some point, but I might not get around to fixing that before new
>pccard work begins.  I think it would be easy to mostly fix (like the
>old code mostly worked) with more thought on how to do this (see -arch
>for a message related tot his problem).

  I think FreeBSD-4-current does not support PC-Card suspend yet.
  I read and diffed old code and current code.  But I did not find
out anything

  Does someone create patch for this problem?

# or we need to rewrite and maintain pccard code(/sys/dev/pccard)?

Thanks in advance

MIHIRA Sanpei Yoshiro
Yokohama, Japan.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message