Re: problem with SCSI

2006-06-07 Thread Oleg D.

Doug Barton wrote:


Oleg D. wrote:
 


Sorry for some offtopic.

Experiencing some troubles with SCSI disks on FBSD 4.8
   



This version is way past its useful life. You should seriously plan to
upgrade at the earliest possible moment.
 

Maybe, but this machine has some jails on it. And after upgrading 
main-machine there's a lot work to do to run jails with same world as 
server runs, upgrading userland, etc... Cause I don't see any reason to 
run different worlds on main and in jails - this may cause more troubles 
even.
Server runs FBSD 4.8 for when it was released and only one trouble 
happened...


 


and looking for advice/solution how to fix/diagnose-more...

What (maybe not) causes troubles:

okey# make clean
===  Cleaning for m4-1.4_1
rm: /usr/ports/devel/m4/work: Directory not empty
*** Error code 1
   



Try rebooting to single user mode and running 'fsck -y'. That may help.

Good luck,

Doug

 

fsck runs every time when machine comes on after reboot and mountpoints 
weren't properly dismounted.


/etc/rc.conf:
fsck_y_enable=YES
fsck_background=NO

And single_mode-fsck_-y was tried too already.

So, I don't expect any miracle after your advice

Trouble still exists.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Intel 945GM chipset support

2006-06-07 Thread Vladimir Terziev

Hi hackers,

i'm interested in buying a Toshiba laptop which has Intel 945GM chipset.

Does FreeBSD supports this chipset ? I was unable to find nothing about 
it anywhere ...

Thanks in advance!

Vladimir
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Intel 945GM chipset support

2006-06-07 Thread Vladimir Terziev

This doesn't sound good :(

As i found in XOrg's documentation, i945 graphics chip is supported by 
i810 XOrg driver, but i suppose the apg support must be provided by the kernel 
?!

Vladimir

On Wed, 7 Jun 2006 17:01:52 +0200
Paolo Pisati [EMAIL PROTECTED] wrote:

 On Wed, Jun 07, 2006 at 02:14:19PM +0300, Vladimir Terziev wrote:
  
  Hi hackers,
  
  i'm interested in buying a Toshiba laptop which has Intel 945GM chipset.
  
  Does FreeBSD supports this chipset ? I was unable to find nothing about 
  it anywhere ...
  
 
 works flawlessly here except for X: there's no agp support
 for this chipset, that means you have to use vesa.
 
 bye
 -- 
 
 Paolo
 
 Piso's first law: nothing works as expected!
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


working with PCI config registers (extensively)

2006-06-07 Thread Andriy Gapon

I am writing a driver for some PCI hardware that does not have any IO
ports or IO memory (and thus does not have any useful BARs), but rather
it is controlled and communicated with by writes and reads of certain
vendor-specific PCI configuration registers.

I see that I can use pci_read_config() and pci_write_config() to do
this, but I am not sure if there are any caveats that I should be aware
of, any precautions that I should take and any conventions/rules that I
should follow.

To explain my question - I am concerned about PCI configuration space
resources ownership, concurrency, etc. Basically things that should not
matter in practice :-)

-- 
Andriy Gapon
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


using smbus from within kernel-land

2006-06-07 Thread Andriy Gapon

I am writing a driver for a piece of hardware that can be communicated
with only through SMBus. My SMBus controller is already supported by
FreeBSD and I can do some testing from userland via ioctls of /dev/smb#.

I would like to learn how to do properly the following things in
kernel-land:

1. declare that my module/driver uses smbus, and make smbus and a driver
for my particular smb controller be loaded when my module is loaded
2. discover smbus of interest and slave address of interest provided
that I know how my hardware responds to particular commands
3. register/allocate smbus of interest and/or slave address of interest
(smbus resource) to my driver
3a. make sure that smbus will no go away (get unloaded) while my
module/driver is loaded and active
3b. make sure that there will be no issues with concurrent access of
my smbus, that is, that no activity on /dev/smb# or other activity on
my smbus interferes my driver's smbus usage
3c. likewise to the above, make sure that nothing tries to own my
slave address

I see that in Linux they have some framework for using smbus and its
resources from kernel-land:
http://www.charmed.com/txt/writing-clients.txt

I could not find anything similar in FreeBSD. I see that we use smbus in
kernel-land only in two places: device smb and bktr driver. Both seem to
be rather special, if I interpret things correctly. device smb seems to
be a glue between smbus and user-land, so it does not claim any specific
resources and translates commands from userland in one-shot fashion,
without any long term resource acquirement. bktr driver seems to be both
smb controller and smb client at once. So, probably, it is not worried
too much about concurrency and resource ownership issues.

This is what I have written so far for smbus/HW detection:
sc-smbus_dev = NULL;
smbus_class = devclass_find(smbus);
if (smbus_class == NULL)
goto end;

for (i = 0; i  128; i++) {
int j, err;
uint8_t val;

smbus_dev = devclass_get_device(smbus_class, i);
if (smbus_dev == NULL) /* past last unit ??? */
break;

for (j = 0; j  sizeof(identity)/sizeof(identity[0]); j++) {
if ((err = smbus_readb(smbus_dev, SLAVE_ADDR,
identity[j].reg, val)) != 0)
break;
if (val != identity[j].val)
break;
}

if (j == sizeof(identity)/sizeof(identity[0])) {
/* all checks passed */
sc-smbus_dev = smbus_dev;
break;
}
}

Basically, outer loop tries to loop over all smbus devices/units I could
imagine (0-127), inner loop checks identity registers/commands against
expected values. Currently I check only one slave address, but I plan to
add an intermediate loop that will loop over all possible 127 slave
addresses.


-- 
Andriy Gapon
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Intel 945GM chipset support

2006-06-07 Thread John Nielsen
On Wednesday 07 June 2006 11:34, Vladimir Terziev wrote:
   This doesn't sound good :(

   As i found in XOrg's documentation, i945 graphics chip is supported by
 i810 XOrg driver, but i suppose the apg support must be provided by the
 kernel ?!

I suspect that you will have agp support if you run a recent (post 
6.1) -stable or -current.  I have an 845G and it started working (without any 
patching from me) a little while ago:

agp0: Intel 82845G (845G GMCH) SVGA controller mem 
0x8800-0x8fff,0x8000-0x8007 irq 16 at device 2.0 on pci0
drmsub0: Intel i845G GMCH: (child of agp_i810.c) on agp0

Also, there is an entry for the i945G and i945GM in 
src/sys/dev/drm/drm_pciids.h on my system (recent 6-STABLE).

HTH,

JN
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]