section (except for CONFIG_IP_ROUTE_TOS and CONFIG_IP_ROUTE_FWMARK).
At the moment, few devices support fast switching (tulip is one of
them, modified 8390 can be found at
- ftp://ftp.inr.ac.ru/ip-routing/fastroute-8390.tar.gz).
+ ftp://ftp.inr.ac.ru/ip-routing/fastroute/fastroute-8390.tar.gz).
If unsure, say N.
during periods of extremal congestion. At the moment only a couple
of device drivers support it (really only one -- tulip, modified
8390 can be found at
- ftp://ftp.inr.ac.ru/ip-routing/fastroute-8390.tar.gz). Really, this
- option is applicable to any machine attached to a fast enough
+ ftp://ftp.inr.ac.ru/ip-routing/fastroute/fastroute-8390.tar.gz).
+ Really, this option is applicable to any machine attached to a fast enough
network, and even a 10 Mb NIC is able to kill a not very slow box,
such as a 120MHz Pentium.
under Linux, say Y here (you must also remember to enable the driver
for your HIPPI card below). Most people will say N here.
-CERN HIPPI PCI adapter support
-CONFIG_CERN_HIPPI
- Say Y here if this is your PCI HIPPI network card.
-
- This driver is also available as a module ( = code which can be
- inserted in and removed from the running kernel whenever you want).
- The module will be called cern_hippi.o. If you want to compile it as
- a module, say M here and read Documentation/modules.txt. If unsure,
- say N.
-
Essential RoadRunner HIPPI PCI adapter support
CONFIG_ROADRUNNER
Say Y here if this is your PCI HIPPI network card.
(PhotoCDs). There is a new driver (next question) which can do
this. If you want that one, say N here.
- If the driver doesn't work out of the box, you might want to have a
- look at drivers/cdrom/mcd.h.
-
If you say Y here, you should also say Y or M to "ISO 9660 CDROM
filesystem support" below, because that's the filesystem used on
CDROMs.
want), say M here and read Documentation/modules.txt. The module
will be called smbfs.o. Most people say N, however.
-SMB Win95 bug work-around
-CONFIG_SMB_WIN95
- If you want to connect to a share exported by Windows 95, you should
- say Y here. The Windows 95 server contains a bug that makes listing
- directories unreliable. This option slows down the listing of
- directories. This makes the Windows 95 server a bit more stable.
-
Coda filesystem support
CONFIG_CODA_FS
Coda is an advanced network filesystem, similar to NFS in that it
haven't changed the setting of jumper JP3 on the card. Removing the
jumper sets the card to 0x358.
+ADS Cadet AM/FM Radio Tuner Card
+CONFIG_RADIO_CADET
+ Choose Y here if you have one of these AM/FM radio cards, and then fill
+ in the port address below.
+
+ In order to control your radio card, you will need to use programs
+ that are compatible with the Video for Linux API. Information on
+ this API and pointers to "v4l" programs may be found on the WWW at
+ http://roadrunner.swansea.uk.linux.org/v4l.shtml; to browse the WWW,
+ you need to have access to a machine on the Internet that has a
+ program like lynx or netscape.
+
+ Further documentation on this driver can be found on the WWW at
+ http://linux.blackhawke.net/cadet.html.
+
+ If you want to compile this driver as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want),
+ say M here and read Documentation/modules.txt. The module will be
+ called radio-cadet.o.
+
+ADS Cadet AM/FM Radio Tuner Card I/O Port
+CONFIG_RADIO_CADET_PORT
+ Enter the I/O address of the card here (most commonly 330).
+
SF16FMI Radio
CONFIG_RADIO_SF16FMI
Choose Y here if you have one of these FM radio cards, and then fill
from the running kernel whenever you want). If you want to compile
it as a module, say M here and read Documentation/modules.txt.
+PlanB Video-In for PowerMacs
+CONFIG_VIDEO_PLANB
+ PlanB is the V4L driver for the PowerMac 7x00/8x00 series video
+ input hardware. If you want to experiment with this, say Y.
+ Otherwise, or if you don't understand a word, say N.
+ See http://www.cpu.lu/~mlan/planb.html for more info.
+
+ Saying M will compile this driver as a module (planb.o).
+
#
# ARM options
#
If unsure, say Y.
+IrPORT IrDA Device Driver
+CONFIG_IRPORT_SIR
+ Say Y here if you want to build support for the IrPORT IrDA device
+ driver. If you want to compile it as a module, say M here and
+ read Documentation/modules.txt. IrPORT can be used instead of
+ IrTTY and sometimes this can be better. One example is if your
+ IrDA port does not have echo-canceling, which will work OK with
+ IrPORT since this driver is working in half-duplex mode only. You
+ don't need to use irattach with IrPORT, but you just insert it
+ the same way as FIR drivers (insmod irport io=0x3e8 irq=11).
+ Notice that IrPORT is a SIR device driver which means that speed
+ is limited to 115200 bps.
+
+ If unsure, say Y.
+
Winbond W83977AF IrDA Device Driver
CONFIG_WINBOND_FIR
Say Y here if you want to build IrDA support for the Winbond
read Documentation/modules.txt. This chipset is used by the Toshiba
Tecra laptops.
+Toshiba Type-O IR Port Device Driver
+CONFIG_TOSHIBA_FIR
+ Say Y here if you want to build support for the Toshiba Type-O IR
+ chipset. If you want to compile it as a module, say M here and
+ read Documentation/modules.txt. This chipset is used by the Toshiba
+ Libretto 100CT, and many more laptops.
+
ESI JetEye PC Dongle
CONFIG_ESI_DONGLE
Say Y here if you want to build support for the Extended Systems
by IrTTY. To activate support for Greenwich dongles you will have to
insert "irattach -d girbil" in the /etc/irda/drivers script.
+Parallax Litelink dongle
+CONFIG_LITELINK_DONGLE
+ Say Y here if you want to build support for the Parallax Litelink
+ dongle. If you want to compile it as a module, say M here and read
+ Documentation/modules.txt. The Parallax dongle attaches to the
+ normal 9-pin serial port connector, and can currently only be used
+ by IrTTY. To activate support for Parallax dongles you will have to
+ insert "irattach -d litelink" in the /etc/irda/drivers script.
+
VME (Motorola and BVM) support
CONFIG_VME
Say Y here if you want to build a kernel for a 680x0 based VME
#define SMB_DIRINFO_SIZE 43
#define SMB_STATUS_SIZE 21
+/* yes, this deliberately has two parts */
+#define DENTRY_PATH(dentry) (dentry)->d_parent->d_name.name,(dentry)->d_name.name
+
static int smb_proc_setattr_ext(struct smb_sb_info *, struct inode *,
struct smb_fattr *);
static inline int
/* JanFebMarApr May Jun Jul Aug Sep Oct Nov Dec */
-extern struct timezone sys_tz;
-
static time_t
-utc2local(time_t time)
+utc2local(struct smb_sb_info *server, time_t time)
{
- return time - sys_tz.tz_minuteswest * 60 - (sys_tz.tz_dsttime ? 3600 :0);
+ return time - server->opt.serverzone*60;
}
static time_t
-local2utc(time_t time)
+local2utc(struct smb_sb_info *server, time_t time)
{
- return time + sys_tz.tz_minuteswest * 60 + (sys_tz.tz_dsttime ? 3600 : 0);
+ return time + server->opt.serverzone*60;
}
/* Convert a MS-DOS time/date pair to a UNIX date (seconds since 1 1 70). */
static time_t
-date_dos2unix(__u16 date, __u16 time)
+date_dos2unix(struct smb_sb_info *server, __u16 date, __u16 time)
{
int month, year;
time_t secs;
((date & 31) - 1 + day_n[month] + (year / 4) + year * 365 - ((year & 3) == 0 &&
month < 2 ? 1 : 0) + 3653);
/* days since 1.1.70 plus 80's leap day */
- return local2utc(secs);
+ return local2utc(server, secs);
}
/* Convert linear UNIX date to a MS-DOS time/date pair. */
static void
-date_unix2dos(int unix_date, __u16 *date, __u16 *time)
+date_unix2dos(struct smb_sb_info *server,
+ int unix_date, __u16 *date, __u16 *time)
{
int day, year, nl_day, month;
- unix_date = utc2local(unix_date);
+ unix_date = utc2local(server, unix_date);
*time = (unix_date % 60) / 2 +
(((unix_date / 60) % 60) << 5) +
(((unix_date / 3600) % 24) << 11);
int error = server->err;
char *class = "Unknown";
+#ifdef SMBFS_DEBUG_VERBOSE
+ printk("smb_errno: errcls %d code %d from command 0x%x\n",
+ errcls, error, SMB_CMD(server->packet));
+#endif
+
if (errcls == ERRDOS)
switch (error)
{
class = "ERRCMD";
err_unknown:
- printk("smb_errno: class %s, code %d from command %x\n",
+ printk("smb_errno: class %s, code %d from command 0x%x\n",
class, error, SMB_CMD(server->packet));
return EIO;
}
server->generation += 1;
server->state = CONN_VALID;
error = 0;
+
+ /* check if we have an old smbmount that uses seconds for the
+ serverzone */
+ if (server->opt.serverzone > 12*60 || server->opt.serverzone < -12*60)
+ server->opt.serverzone /= 60;
+
+ /* now that we have an established connection we can detect the server
+ type and enable bug workarounds */
+ if (server->opt.protocol == SMB_PROTOCOL_NT1 &&
+ (server->opt.max_xmit < 0x1000) &&
+ !(server->opt.capabilities & SMB_CAP_NT_SMBS)) {
+ server->mnt->version |= SMB_FIX_WIN95;
+#ifdef SMBFS_DEBUG_VERBOSE
+ printk("smb_newconn: detected WIN95 server\n");
+#endif
+ }
+
#ifdef SMBFS_DEBUG_VERBOSE
-printk("smb_newconn: protocol=%d, max_xmit=%d, pid=%d\n",
-server->opt.protocol, server->opt.max_xmit, server->conn_pid);
+printk("smb_newconn: protocol=%d, max_xmit=%d, pid=%d capabilities=0x%x\n",
+ server->opt.protocol, server->opt.max_xmit, server->conn_pid,
+ server->opt.capabilities);
#endif
out:
{
#ifdef SMBFS_DEBUG_VERBOSE
printk("smb_proc_open: %s/%s R/W failed, error=%d, retrying R/O\n",
-dentry->d_parent->d_name.name, dentry->d_name.name, error);
+ DENTRY_PATH(dentry), error);
#endif
mode = read_only;
goto retry;
if (!inode)
{
printk("smb_open: no inode for dentry %s/%s\n",
- dentry->d_parent->d_name.name, dentry->d_name.name);
+ DENTRY_PATH(dentry));
goto out;
}
{
#ifdef SMBFS_PARANOIA
printk("smb_open: %s/%s open failed, result=%d\n",
-dentry->d_parent->d_name.name, dentry->d_name.name, result);
+ DENTRY_PATH(dentry), result);
#endif
goto out;
}
{
#ifdef SMBFS_PARANOIA
printk("smb_open: %s/%s access denied, access=%x, wish=%x\n",
-dentry->d_parent->d_name.name, dentry->d_name.name,
-inode->u.smbfs_i.access, wish);
+ DENTRY_PATH(dentry), inode->u.smbfs_i.access, wish);
#endif
result = -EACCES;
}
{
smb_setup_header(server, SMBclose, 3, 0);
WSET(server->packet, smb_vwv0, fileid);
- DSET(server->packet, smb_vwv1, utc2local(mtime));
+ DSET(server->packet, smb_vwv1, utc2local(server, mtime));
return smb_request_ok(server, SMBclose, 0, 0);
}
{
#ifdef SMBFS_DEBUG_VERBOSE
printk("smb_close_dentry: closing %s/%s, count=%d\n",
-dentry->d_parent->d_name.name, dentry->d_name.name, dentry->d_count);
+ DENTRY_PATH(dentry), dentry->d_count);
#endif
smb_proc_close_inode(server, ino);
}
}
#ifdef SMBFS_DEBUG_VERBOSE
printk("smb_close_dentry: closed %s/%s, count=%d\n",
-dentry->d_parent->d_name.name, dentry->d_name.name, dentry->d_count);
+ DENTRY_PATH(dentry), dentry->d_count);
#endif
}
}
out:
#ifdef SMBFS_DEBUG_VERBOSE
printk("smb_proc_read: file %s/%s, count=%d, result=%d\n",
-dentry->d_parent->d_name.name, dentry->d_name.name, count, result);
+ DENTRY_PATH(dentry), count, result);
#endif
smb_unlock_server(server);
return result;
#if SMBFS_DEBUG_VERBOSE
printk("smb_proc_write: file %s/%s, count=%d@%ld, packet_size=%d\n",
-dentry->d_parent->d_name.name, dentry->d_name.name,
-count, offset, server->packet_size);
+ DENTRY_PATH(dentry), count, offset, server->packet_size);
#endif
smb_lock_server(server);
p = smb_setup_header(server, SMBwrite, 5, count + 3);
retry:
p = smb_setup_header(server, SMBcreate, 3, 0);
WSET(server->packet, smb_vwv0, attr);
- DSET(server->packet, smb_vwv1, utc2local(ctime));
+ DSET(server->packet, smb_vwv1, utc2local(server, ctime));
*p++ = 4;
p = smb_encode_path(server, p, dentry, NULL);
smb_setup_bcc(server, p);
#ifdef SMBFS_DEBUG_VERBOSE
printk("smb_proc_readdir_short: %s/%s, pos=%d\n",
-dir->d_parent->d_name.name, dir->d_name.name, fpos);
+ DENTRY_PATH(dir), fpos);
#endif
smb_lock_server(server);
*/
date = WVAL(resp_data, 0);
time = WVAL(resp_data, 2);
- fattr->f_ctime = date_dos2unix(date, time);
+ fattr->f_ctime = date_dos2unix(server, date, time);
date = WVAL(resp_data, 4);
time = WVAL(resp_data, 6);
- fattr->f_atime = date_dos2unix(date, time);
+ fattr->f_atime = date_dos2unix(server, date, time);
date = WVAL(resp_data, 8);
time = WVAL(resp_data, 10);
- fattr->f_mtime = date_dos2unix(date, time);
+ fattr->f_mtime = date_dos2unix(server, date, time);
#ifdef SMBFS_DEBUG_VERBOSE
printk("smb_proc_getattr_ff: name=%s, date=%x, time=%x, mtime=%ld\n",
mask, date, time, fattr->f_mtime);
*/
static int
smb_proc_getattr_core(struct smb_sb_info *server, struct dentry *dir,
- struct smb_fattr *fattr)
+ struct smb_fattr *fattr)
{
int result;
char *p;
goto out;
}
fattr->attr = WVAL(server->packet, smb_vwv0);
- fattr->f_mtime = local2utc(DVAL(server->packet, smb_vwv1));
+ fattr->f_mtime = local2utc(server, DVAL(server->packet, smb_vwv1));
fattr->f_size = DVAL(server->packet, smb_vwv3);
fattr->f_ctime = fattr->f_mtime;
fattr->f_atime = fattr->f_mtime;
#ifdef SMBFS_DEBUG_TIMESTAMP
printk("getattr_core: %s/%s, mtime=%ld\n",
-dir->d_name.name, name->name, fattr->f_mtime);
+ DENTRY_PATH(dir), fattr->f_mtime);
#endif
result = 0;
}
date = WVAL(resp_data, off_date);
time = WVAL(resp_data, off_time);
- attr->f_ctime = date_dos2unix(date, time);
+ attr->f_ctime = date_dos2unix(server, date, time);
date = WVAL(resp_data, 4 + off_date);
time = WVAL(resp_data, 4 + off_time);
- attr->f_atime = date_dos2unix(date, time);
+ attr->f_atime = date_dos2unix(server, date, time);
date = WVAL(resp_data, 8 + off_date);
time = WVAL(resp_data, 8 + off_time);
- attr->f_mtime = date_dos2unix(date, time);
+ attr->f_mtime = date_dos2unix(server, date, time);
#ifdef SMBFS_DEBUG_TIMESTAMP
printk("getattr_trans2: %s/%s, date=%x, time=%x, mtime=%ld\n",
-dir->d_name.name, name->name, date, time, attr->f_mtime);
+ DENTRY_PATH(dir), date, time, attr->f_mtime);
#endif
attr->f_size = DVAL(resp_data, 12);
attr->attr = WVAL(resp_data, 20);
return result;
}
+
/*
* Called with the server locked. Because of bugs in the
* core protocol, we use this only to set attributes. See
*/
static int
smb_proc_setattr_core(struct smb_sb_info *server, struct dentry *dentry,
- __u16 attr)
+ __u16 attr)
{
char *p;
int result;
WSET(server->packet, smb_vwv6, 0);
WSET(server->packet, smb_vwv7, 0);
*p++ = 4;
- /*
- * Samba uses three leading '\', so we'll do it too.
- */
- *p++ = '\\';
- *p++ = '\\';
p = smb_encode_path(server, p, dentry, NULL);
*p++ = 4;
*p++ = 0;
#ifdef SMBFS_DEBUG_VERBOSE
printk("smb_proc_setattr: setting %s/%s, open=%d\n",
-dir->d_parent->d_name.name, dir->d_name.name, smb_is_open(dir->d_inode));
+ DENTRY_PATH(dir), smb_is_open(dir->d_inode));
#endif
smb_lock_server(server);
result = smb_proc_setattr_core(server, dir, fattr->attr);
/* We don't change the creation time */
WSET(server->packet, smb_vwv1, 0);
WSET(server->packet, smb_vwv2, 0);
- date_unix2dos(fattr->f_atime, &date, &time);
+ date_unix2dos(server, fattr->f_atime, &date, &time);
WSET(server->packet, smb_vwv3, date);
WSET(server->packet, smb_vwv4, time);
- date_unix2dos(fattr->f_mtime, &date, &time);
+ date_unix2dos(server, fattr->f_mtime, &date, &time);
WSET(server->packet, smb_vwv5, date);
WSET(server->packet, smb_vwv6, time);
#ifdef SMBFS_DEBUG_TIMESTAMP
WSET(data, 0, 0); /* creation time */
WSET(data, 2, 0);
- date_unix2dos(fattr->f_atime, &date, &time);
+ date_unix2dos(server, fattr->f_atime, &date, &time);
WSET(data, 4, date);
WSET(data, 6, time);
- date_unix2dos(fattr->f_mtime, &date, &time);
+ date_unix2dos(server, fattr->f_mtime, &date, &time);
WSET(data, 8, date);
WSET(data, 10, time);
#ifdef SMBFS_DEBUG_TIMESTAMP
printk("setattr_trans2: %s/%s, date=%x, time=%x, mtime=%ld\n",
-dir->d_parent->d_name.name, dir->d_name.name, date, time, fattr->f_mtime);
+ DENTRY_PATH(dir), date, time, fattr->f_mtime);
#endif
DSET(data, 12, 0); /* size */
DSET(data, 16, 0); /* blksize */
#ifdef SMBFS_DEBUG_VERBOSE
printk("smb_proc_settime: setting %s/%s, open=%d\n",
-dentry->d_parent->d_name.name, dentry->d_name.name, smb_is_open(inode));
+ DENTRY_PATH(dentry), smb_is_open(inode));
#endif
smb_lock_server(server);
- if (server->opt.protocol >= SMB_PROTOCOL_LANMAN2)
+ /* setting the time on a Win95 server fails (tridge) */
+ if (server->opt.protocol >= SMB_PROTOCOL_LANMAN2 &&
+ !(server->mnt->version & SMB_FIX_WIN95))
{
if (smb_is_open(inode) &&
inode->u.smbfs_i.access != SMB_O_RDONLY)
{
/*
* Set the mtime by opening and closing the file.
+ * Note that the file is opened read-only, but this
+ * still allows us to set the date (tridge)
*/
result = -EACCES;
if (!smb_is_open(inode))
- smb_proc_open(server, dentry, SMB_O_WRONLY);
- if (smb_is_open(inode) &&
- inode->u.smbfs_i.access != SMB_O_RDONLY)
+ smb_proc_open(server, dentry, SMB_O_RDONLY);
+ if (smb_is_open(inode))
{
inode->i_mtime = fattr->f_mtime;
result = smb_proc_close_inode(server, inode);